<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE CPP, RecordWildCards #-}</span><span>
</span><span id="line-2"></span><span>
</span><span id="line-3"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-4"></span><span class="hs-comment">--</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- Stg to C-- code generation:</span><span>
</span><span id="line-6"></span><span class="hs-comment">--</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- The types   LambdaFormInfo</span><span>
</span><span id="line-8"></span><span class="hs-comment">--             ClosureInfo</span><span>
</span><span id="line-9"></span><span class="hs-comment">--</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Nothing monadic in here!</span><span>
</span><span id="line-11"></span><span class="hs-comment">--</span><span>
</span><span id="line-12"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-13"></span><span>
</span><span id="line-14"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.StgToCmm.Closure</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-15"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#DynTag"><span class="hs-identifier">DynTag</span></a></span><span class="hs-special">,</span><span>  </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#tagForCon"><span class="hs-identifier">tagForCon</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#isSmallFamily"><span class="hs-identifier">isSmallFamily</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-16"></span><span>
</span><span id="line-17"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#idPrimRep"><span class="hs-identifier">idPrimRep</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html#isVoidRep"><span class="hs-identifier">isVoidRep</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html#isGcPtrRep"><span class="hs-identifier">isGcPtrRep</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#addIdReps"><span class="hs-identifier">addIdReps</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#addArgReps"><span class="hs-identifier">addArgReps</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-18"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#argPrimRep"><span class="hs-identifier">argPrimRep</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-19"></span><span>
</span><span id="line-20"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier">NonVoid</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#fromNonVoid"><span class="hs-identifier">fromNonVoid</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#nonVoidIds"><span class="hs-identifier">nonVoidIds</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#nonVoidStgArgs"><span class="hs-identifier">nonVoidStgArgs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-21"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#assertNonVoidIds"><span class="hs-identifier">assertNonVoidIds</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#assertNonVoidStgArgs"><span class="hs-identifier">assertNonVoidStgArgs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-22"></span><span>
</span><span id="line-23"></span><span>        </span><span class="annot"><span class="hs-comment">-- * LambdaFormInfo</span></span><span>
</span><span id="line-24"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier">LambdaFormInfo</span></a></span><span class="hs-special">,</span><span>         </span><span class="hs-comment">-- Abstract</span><span>
</span><span id="line-25"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Types.html#StandardFormInfo"><span class="hs-identifier">StandardFormInfo</span></a></span><span class="hs-special">,</span><span>        </span><span class="hs-comment">-- ...ditto...</span><span>
</span><span id="line-26"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#mkLFThunk"><span class="hs-identifier">mkLFThunk</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#mkLFReEntrant"><span class="hs-identifier">mkLFReEntrant</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#mkConLFInfo"><span class="hs-identifier">mkConLFInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#mkSelectorLFInfo"><span class="hs-identifier">mkSelectorLFInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-27"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#mkApLFInfo"><span class="hs-identifier">mkApLFInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#mkLFImported"><span class="hs-identifier">mkLFImported</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#mkLFArgument"><span class="hs-identifier">mkLFArgument</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#mkLFLetNoEscape"><span class="hs-identifier">mkLFLetNoEscape</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-28"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#mkLFStringLit"><span class="hs-identifier">mkLFStringLit</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-29"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#lfDynTag"><span class="hs-identifier">lfDynTag</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-30"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#isLFThunk"><span class="hs-identifier">isLFThunk</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#isLFReEntrant"><span class="hs-identifier">isLFReEntrant</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#lfUpdatable"><span class="hs-identifier">lfUpdatable</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>
</span><span id="line-32"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Used by other modules</span></span><span>
</span><span id="line-33"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#CgLoc"><span class="hs-identifier">CgLoc</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#SelfLoopInfo"><span class="hs-identifier">SelfLoopInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#CallMethod"><span class="hs-identifier">CallMethod</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-34"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#nodeMustPointToIt"><span class="hs-identifier">nodeMustPointToIt</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#isKnownFun"><span class="hs-identifier">isKnownFun</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#funTag"><span class="hs-identifier">funTag</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#tagForArity"><span class="hs-identifier">tagForArity</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#getCallMethod"><span class="hs-identifier">getCallMethod</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-35"></span><span>
</span><span id="line-36"></span><span>        </span><span class="annot"><span class="hs-comment">-- * ClosureInfo</span></span><span>
</span><span id="line-37"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#ClosureInfo"><span class="hs-identifier">ClosureInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-38"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#mkClosureInfo"><span class="hs-identifier">mkClosureInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-39"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#mkCmmInfo"><span class="hs-identifier">mkCmmInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-40"></span><span>
</span><span id="line-41"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Inspection</span></span><span>
</span><span id="line-42"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#closureLFInfo"><span class="hs-identifier">closureLFInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#closureName"><span class="hs-identifier">closureName</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-43"></span><span>
</span><span id="line-44"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Labels</span></span><span>
</span><span id="line-45"></span><span>        </span><span class="hs-comment">-- These just need the info table label</span><span>
</span><span id="line-46"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#closureInfoLabel"><span class="hs-identifier">closureInfoLabel</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#staticClosureLabel"><span class="hs-identifier">staticClosureLabel</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-47"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#closureSlowEntryLabel"><span class="hs-identifier">closureSlowEntryLabel</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#closureLocalEntryLabel"><span class="hs-identifier">closureLocalEntryLabel</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-48"></span><span>
</span><span id="line-49"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Predicates</span></span><span>
</span><span id="line-50"></span><span>        </span><span class="hs-comment">-- These are really just functions on LambdaFormInfo</span><span>
</span><span id="line-51"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#closureUpdReqd"><span class="hs-identifier">closureUpdReqd</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-52"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#closureReEntrant"><span class="hs-identifier">closureReEntrant</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#closureFunInfo"><span class="hs-identifier">closureFunInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-53"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#isToplevClosure"><span class="hs-identifier">isToplevClosure</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-54"></span><span>
</span><span id="line-55"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#blackHoleOnEntry"><span class="hs-identifier">blackHoleOnEntry</span></a></span><span class="hs-special">,</span><span>  </span><span class="hs-comment">-- Needs LambdaFormInfo and SMRep</span><span>
</span><span id="line-56"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#isStaticClosure"><span class="hs-identifier">isStaticClosure</span></a></span><span class="hs-special">,</span><span>   </span><span class="hs-comment">-- Needs SMPre</span><span>
</span><span id="line-57"></span><span>
</span><span id="line-58"></span><span>        </span><span class="annot"><span class="hs-comment">-- * InfoTables</span></span><span>
</span><span id="line-59"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#mkDataConInfoTable"><span class="hs-identifier">mkDataConInfoTable</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-60"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#cafBlackHoleInfoTable"><span class="hs-identifier">cafBlackHoleInfoTable</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-61"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#indStaticInfoTable"><span class="hs-identifier">indStaticInfoTable</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-62"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#staticClosureNeedsLink"><span class="hs-identifier">staticClosureNeedsLink</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-63"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span class="hs-cpp">

#include &quot;HsVersions.h&quot;
</span><span>
</span><span id="line-67"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-68"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#"><span class="hs-identifier">GHC.Platform</span></a></span><span>
</span><span id="line-69"></span><span>
</span><span id="line-70"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html"><span class="hs-identifier">GHC.Stg.Syntax</span></a></span><span>
</span><span id="line-71"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html"><span class="hs-identifier">GHC.Runtime.Heap.Layout</span></a></span><span>
</span><span id="line-72"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.html"><span class="hs-identifier">GHC.Cmm</span></a></span><span>
</span><span id="line-73"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Ppr.Expr.html"><span class="hs-identifier">GHC.Cmm.Ppr.Expr</span></a></span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- For Outputable instances</span><span>
</span><span id="line-74"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html"><span class="hs-identifier">GHC.StgToCmm.Types</span></a></span><span>
</span><span id="line-75"></span><span>
</span><span id="line-76"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.CostCentre.html"><span class="hs-identifier">GHC.Types.CostCentre</span></a></span><span>
</span><span id="line-77"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.BlockId.html"><span class="hs-identifier">GHC.Cmm.BlockId</span></a></span><span>
</span><span id="line-78"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html"><span class="hs-identifier">GHC.Cmm.CLabel</span></a></span><span>
</span><span id="line-79"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Id.html"><span class="hs-identifier">GHC.Types.Id</span></a></span><span>
</span><span id="line-80"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Id.Info.html"><span class="hs-identifier">GHC.Types.Id.Info</span></a></span><span>
</span><span id="line-81"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html"><span class="hs-identifier">GHC.Core.DataCon</span></a></span><span>
</span><span id="line-82"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.html"><span class="hs-identifier">GHC.Types.Name</span></a></span><span>
</span><span id="line-83"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Type.html"><span class="hs-identifier">GHC.Core.Type</span></a></span><span>
</span><span id="line-84"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html"><span class="hs-identifier">GHC.Core.TyCo.Rep</span></a></span><span>
</span><span id="line-85"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Tc.Utils.TcType.html"><span class="hs-identifier">GHC.Tc.Utils.TcType</span></a></span><span>
</span><span id="line-86"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html"><span class="hs-identifier">GHC.Core.TyCon</span></a></span><span>
</span><span id="line-87"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.RepType.html"><span class="hs-identifier">GHC.Types.RepType</span></a></span><span>
</span><span id="line-88"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html"><span class="hs-identifier">GHC.Types.Basic</span></a></span><span>
</span><span id="line-89"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-90"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html"><span class="hs-identifier">GHC.Driver.Session</span></a></span><span>
</span><span id="line-91"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>
</span><span id="line-92"></span><span>
</span><span id="line-93"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Coerce.html#"><span class="hs-identifier">Data.Coerce</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier">coerce</span></span><span class="hs-special">)</span><span>
</span><span id="line-94"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Char8.html#"><span class="hs-identifier">Data.ByteString.Char8</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">BS8</span></span><span>
</span><span id="line-95"></span><span>
</span><span id="line-96"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-97"></span><span class="hs-comment">--                Data types and synonyms</span><span>
</span><span id="line-98"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-99"></span><span>
</span><span id="line-100"></span><span class="hs-comment">-- These data types are mostly used by other modules, especially</span><span>
</span><span id="line-101"></span><span class="hs-comment">-- GHC.StgToCmm.Monad, but we define them here because some functions in this</span><span>
</span><span id="line-102"></span><span class="hs-comment">-- module need to have access to them as well</span><span>
</span><span id="line-103"></span><span>
</span><span id="line-104"></span><span class="hs-keyword">data</span><span> </span><span id="CgLoc"><span class="annot"><a href="GHC.StgToCmm.Closure.html#CgLoc"><span class="hs-identifier hs-var">CgLoc</span></a></span></span><span>
</span><span id="line-105"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="CmmLoc"><span class="annot"><a href="GHC.StgToCmm.Closure.html#CmmLoc"><span class="hs-identifier hs-var">CmmLoc</span></a></span></span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span>      </span><span class="hs-comment">-- A stable CmmExpr; that is, one not mentioning</span><span>
</span><span id="line-106"></span><span>                        </span><span class="hs-comment">-- Hp, so that it remains valid across calls</span><span>
</span><span id="line-107"></span><span>
</span><span id="line-108"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="LneLoc"><span class="annot"><a href="GHC.StgToCmm.Closure.html#LneLoc"><span class="hs-identifier hs-var">LneLoc</span></a></span></span><span> </span><span class="annot"><a href="GHC.Cmm.BlockId.html#BlockId"><span class="hs-identifier hs-type">BlockId</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Expr.html#LocalReg"><span class="hs-identifier hs-type">LocalReg</span></a></span><span class="hs-special">]</span><span>             </span><span class="hs-comment">-- A join point</span><span>
</span><span id="line-109"></span><span>        </span><span class="hs-comment">-- A join point (= let-no-escape) should only</span><span>
</span><span id="line-110"></span><span>        </span><span class="hs-comment">-- be tail-called, and in a saturated way.</span><span>
</span><span id="line-111"></span><span>        </span><span class="hs-comment">-- To tail-call it, assign to these locals,</span><span>
</span><span id="line-112"></span><span>        </span><span class="hs-comment">-- and branch to the block id</span><span>
</span><span id="line-113"></span><span>
</span><span id="line-114"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621681004172"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#CgLoc"><span class="hs-identifier hs-type">CgLoc</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-115"></span><span>  </span><span id="local-6989586621681004162"><span class="annot"><span class="annottext">ppr :: CgLoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#CmmLoc"><span class="hs-identifier hs-type">CmmLoc</span></a></span><span> </span><span id="local-6989586621681004160"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681004160"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;cmm&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681004160"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-116"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#LneLoc"><span class="hs-identifier hs-type">LneLoc</span></a></span><span> </span><span id="local-6989586621681004157"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681004157"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621681004156"><span class="annot"><span class="annottext">[LocalReg]
</span><a href="#local-6989586621681004156"><span class="hs-identifier hs-var">rs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;lne&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681004157"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[LocalReg] -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[LocalReg]
</span><a href="#local-6989586621681004156"><span class="hs-identifier hs-var">rs</span></a></span><span>
</span><span id="line-117"></span><span>
</span><span id="line-118"></span><span class="hs-keyword">type</span><span> </span><span id="SelfLoopInfo"><span class="annot"><a href="GHC.StgToCmm.Closure.html#SelfLoopInfo"><span class="hs-identifier hs-var">SelfLoopInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.BlockId.html#BlockId"><span class="hs-identifier hs-type">BlockId</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Expr.html#LocalReg"><span class="hs-identifier hs-type">LocalReg</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-119"></span><span>
</span><span id="line-120"></span><span class="hs-comment">-- used by ticky profiling</span><span>
</span><span id="line-121"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#isKnownFun"><span class="hs-identifier hs-type">isKnownFun</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-122"></span><span id="isKnownFun"><span class="annot"><span class="annottext">isKnownFun :: LambdaFormInfo -&gt; Bool
</span><a href="GHC.StgToCmm.Closure.html#isKnownFun"><span class="hs-identifier hs-var hs-var">isKnownFun</span></a></span></span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LFReEntrant"><span class="hs-identifier hs-type">LFReEntrant</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-123"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#isKnownFun"><span class="hs-identifier hs-var">isKnownFun</span></a></span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="GHC.StgToCmm.Types.html#LFLetNoEscape"><span class="hs-identifier hs-var">LFLetNoEscape</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-124"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#isKnownFun"><span class="hs-identifier hs-var">isKnownFun</span></a></span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><span class="hs-identifier">_</span></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-125"></span><span>
</span><span id="line-126"></span><span>
</span><span id="line-127"></span><span class="hs-comment">-------------------------------------</span><span>
</span><span id="line-128"></span><span class="hs-comment">--        Non-void types</span><span>
</span><span id="line-129"></span><span class="hs-comment">-------------------------------------</span><span>
</span><span id="line-130"></span><span class="hs-comment">-- We frequently need the invariant that an Id or a an argument</span><span>
</span><span id="line-131"></span><span class="hs-comment">-- is of a non-void type. This type is a witness to the invariant.</span><span>
</span><span id="line-132"></span><span>
</span><span id="line-133"></span><span class="hs-keyword">newtype</span><span> </span><span id="NonVoid"><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-var">NonVoid</span></a></span></span><span> </span><span id="local-6989586621681004348"><span class="annot"><a href="#local-6989586621681004348"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="NonVoid"><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-var">NonVoid</span></a></span></span><span> </span><span class="annot"><a href="#local-6989586621681004348"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-134"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681004146"><span id="local-6989586621681004150"><span class="annot"><span class="annottext">NonVoid a -&gt; NonVoid a -&gt; Bool
(NonVoid a -&gt; NonVoid a -&gt; Bool)
-&gt; (NonVoid a -&gt; NonVoid a -&gt; Bool) -&gt; Eq (NonVoid a)
forall a. Eq a =&gt; NonVoid a -&gt; NonVoid a -&gt; Bool
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: NonVoid a -&gt; NonVoid a -&gt; Bool
$c/= :: forall a. Eq a =&gt; NonVoid a -&gt; NonVoid a -&gt; Bool
== :: NonVoid a -&gt; NonVoid a -&gt; Bool
$c== :: forall a. Eq a =&gt; NonVoid a -&gt; NonVoid a -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681004134"><span id="local-6989586621681004136"><span id="local-6989586621681004140"><span class="annot"><span class="annottext">RepArity -&gt; NonVoid a -&gt; ShowS
[NonVoid a] -&gt; ShowS
NonVoid a -&gt; String
(RepArity -&gt; NonVoid a -&gt; ShowS)
-&gt; (NonVoid a -&gt; String)
-&gt; ([NonVoid a] -&gt; ShowS)
-&gt; Show (NonVoid a)
forall a. Show a =&gt; RepArity -&gt; NonVoid a -&gt; ShowS
forall a. Show a =&gt; [NonVoid a] -&gt; ShowS
forall a. Show a =&gt; NonVoid a -&gt; String
forall a.
(RepArity -&gt; a -&gt; ShowS)
-&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [NonVoid a] -&gt; ShowS
$cshowList :: forall a. Show a =&gt; [NonVoid a] -&gt; ShowS
show :: NonVoid a -&gt; String
$cshow :: forall a. Show a =&gt; NonVoid a -&gt; String
showsPrec :: RepArity -&gt; NonVoid a -&gt; ShowS
$cshowsPrec :: forall a. Show a =&gt; RepArity -&gt; NonVoid a -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-135"></span><span>
</span><span id="line-136"></span><span id="local-6989586621681004345"><span class="annot"><a href="GHC.StgToCmm.Closure.html#fromNonVoid"><span class="hs-identifier hs-type">fromNonVoid</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-type">NonVoid</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681004345"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621681004345"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-137"></span><span id="fromNonVoid"><span class="annot"><span class="annottext">fromNonVoid :: forall a. NonVoid a -&gt; a
</span><a href="GHC.StgToCmm.Closure.html#fromNonVoid"><span class="hs-identifier hs-var hs-var">fromNonVoid</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-type">NonVoid</span></a></span><span> </span><span id="local-6989586621681004132"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681004132"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681004132"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-138"></span><span>
</span><span id="line-139"></span><span id="local-6989586621681004343"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621681004129"><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681004343"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-type">NonVoid</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681004343"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-140"></span><span>  </span><span id="local-6989586621681004127"><span class="annot"><span class="annottext">ppr :: NonVoid a -&gt; SDoc
</span><a href="#local-6989586621681004127"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-type">NonVoid</span></a></span><span> </span><span id="local-6989586621681004126"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681004126"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681004126"><span class="hs-identifier hs-var">a</span></a></span></span><span>
</span><span id="line-141"></span><span>
</span><span id="line-142"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#nonVoidIds"><span class="hs-identifier hs-type">nonVoidIds</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-type">NonVoid</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-143"></span><span id="nonVoidIds"><span class="annot"><span class="annottext">nonVoidIds :: [Id] -&gt; [NonVoid Id]
</span><a href="GHC.StgToCmm.Closure.html#nonVoidIds"><span class="hs-identifier hs-var hs-var">nonVoidIds</span></a></span></span><span> </span><span id="local-6989586621681004125"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681004125"><span class="hs-identifier hs-var">ids</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Id -&gt; NonVoid Id
forall a. a -&gt; NonVoid a
</span><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-var">NonVoid</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681004124"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621681004124"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681004124"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681004125"><span class="hs-identifier hs-var">ids</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; Bool
</span><a href="GHC.Types.RepType.html#isVoidTy"><span class="hs-identifier hs-var">isVoidTy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Type
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var">idType</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681004124"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-144"></span><span>
</span><span id="line-145"></span><span class="hs-comment">-- | Used in places where some invariant ensures that all these Ids are</span><span>
</span><span id="line-146"></span><span class="hs-comment">-- non-void; e.g. constructor field binders in case expressions.</span><span>
</span><span id="line-147"></span><span class="hs-comment">-- See Note [Post-unarisation invariants] in &quot;GHC.Stg.Unarise&quot;.</span><span>
</span><span id="line-148"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#assertNonVoidIds"><span class="hs-identifier hs-type">assertNonVoidIds</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-type">NonVoid</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-149"></span><span id="assertNonVoidIds"><span class="annot"><span class="annottext">assertNonVoidIds :: [Id] -&gt; [NonVoid Id]
</span><a href="GHC.StgToCmm.Closure.html#assertNonVoidIds"><span class="hs-identifier hs-var hs-var">assertNonVoidIds</span></a></span></span><span> </span><span id="local-6989586621681004120"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681004120"><span class="hs-identifier hs-var">ids</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span class="hs-identifier">not</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">any</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">isVoidTy</span><span> </span><span class="hs-operator">.</span><span> </span><span class="hs-identifier">idType</span><span class="hs-special">)</span><span> </span><span class="hs-identifier">ids</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-150"></span><span>                       </span><span class="annot"><span class="annottext">[Id] -&gt; [NonVoid Id]
</span><span class="hs-identifier hs-var">coerce</span></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681004120"><span class="hs-identifier hs-var">ids</span></a></span><span>
</span><span id="line-151"></span><span>
</span><span id="line-152"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#nonVoidStgArgs"><span class="hs-identifier hs-type">nonVoidStgArgs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Stg.Syntax.html#StgArg"><span class="hs-identifier hs-type">StgArg</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-type">NonVoid</span></a></span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html#StgArg"><span class="hs-identifier hs-type">StgArg</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-153"></span><span id="nonVoidStgArgs"><span class="annot"><span class="annottext">nonVoidStgArgs :: [StgArg] -&gt; [NonVoid StgArg]
</span><a href="GHC.StgToCmm.Closure.html#nonVoidStgArgs"><span class="hs-identifier hs-var hs-var">nonVoidStgArgs</span></a></span></span><span> </span><span id="local-6989586621681004114"><span class="annot"><span class="annottext">[StgArg]
</span><a href="#local-6989586621681004114"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">StgArg -&gt; NonVoid StgArg
forall a. a -&gt; NonVoid a
</span><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-var">NonVoid</span></a></span><span> </span><span class="annot"><span class="annottext">StgArg
</span><a href="#local-6989586621681004113"><span class="hs-identifier hs-var">arg</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621681004113"><span class="annot"><span class="annottext">StgArg
</span><a href="#local-6989586621681004113"><span class="hs-identifier hs-var">arg</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[StgArg]
</span><a href="#local-6989586621681004114"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; Bool
</span><a href="GHC.Types.RepType.html#isVoidTy"><span class="hs-identifier hs-var">isVoidTy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">StgArg -&gt; Type
</span><a href="GHC.Stg.Syntax.html#stgArgType"><span class="hs-identifier hs-var">stgArgType</span></a></span><span> </span><span class="annot"><span class="annottext">StgArg
</span><a href="#local-6989586621681004113"><span class="hs-identifier hs-var">arg</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-154"></span><span>
</span><span id="line-155"></span><span class="hs-comment">-- | Used in places where some invariant ensures that all these arguments are</span><span>
</span><span id="line-156"></span><span class="hs-comment">-- non-void; e.g. constructor arguments.</span><span>
</span><span id="line-157"></span><span class="hs-comment">-- See Note [Post-unarisation invariants] in &quot;GHC.Stg.Unarise&quot;.</span><span>
</span><span id="line-158"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#assertNonVoidStgArgs"><span class="hs-identifier hs-type">assertNonVoidStgArgs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Stg.Syntax.html#StgArg"><span class="hs-identifier hs-type">StgArg</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-type">NonVoid</span></a></span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html#StgArg"><span class="hs-identifier hs-type">StgArg</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-159"></span><span id="assertNonVoidStgArgs"><span class="annot"><span class="annottext">assertNonVoidStgArgs :: [StgArg] -&gt; [NonVoid StgArg]
</span><a href="GHC.StgToCmm.Closure.html#assertNonVoidStgArgs"><span class="hs-identifier hs-var hs-var">assertNonVoidStgArgs</span></a></span></span><span> </span><span id="local-6989586621681004111"><span class="annot"><span class="annottext">[StgArg]
</span><a href="#local-6989586621681004111"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span class="hs-identifier">not</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">any</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">isVoidTy</span><span> </span><span class="hs-operator">.</span><span> </span><span class="hs-identifier">stgArgType</span><span class="hs-special">)</span><span> </span><span class="hs-identifier">args</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-160"></span><span>                            </span><span class="annot"><span class="annottext">[StgArg] -&gt; [NonVoid StgArg]
</span><span class="hs-identifier hs-var">coerce</span></span><span> </span><span class="annot"><span class="annottext">[StgArg]
</span><a href="#local-6989586621681004111"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-161"></span><span>
</span><span id="line-162"></span><span>
</span><span id="line-163"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-164"></span><span class="hs-comment">--                Representations</span><span>
</span><span id="line-165"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-166"></span><span>
</span><span id="line-167"></span><span class="hs-comment">-- Why are these here?</span><span>
</span><span id="line-168"></span><span>
</span><span id="line-169"></span><span class="hs-comment">-- | Assumes that there is precisely one 'PrimRep' of the type. This assumption</span><span>
</span><span id="line-170"></span><span class="hs-comment">-- holds after unarise.</span><span>
</span><span id="line-171"></span><span class="hs-comment">-- See Note [Post-unarisation invariants]</span><span>
</span><span id="line-172"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#idPrimRep"><span class="hs-identifier hs-type">idPrimRep</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html#PrimRep"><span class="hs-identifier hs-type">PrimRep</span></a></span><span>
</span><span id="line-173"></span><span id="idPrimRep"><span class="annot"><span class="annottext">idPrimRep :: Id -&gt; PrimRep
</span><a href="GHC.StgToCmm.Closure.html#idPrimRep"><span class="hs-identifier hs-var hs-var">idPrimRep</span></a></span></span><span> </span><span id="local-6989586621681004110"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681004110"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Type -&gt; PrimRep
Type -&gt; PrimRep
</span><a href="GHC.Types.RepType.html#typePrimRep1"><span class="hs-identifier hs-var">typePrimRep1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Type
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var">idType</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681004110"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-174"></span><span>    </span><span class="hs-comment">-- See also Note [VoidRep] in GHC.Types.RepType</span><span>
</span><span id="line-175"></span><span>
</span><span id="line-176"></span><span class="hs-comment">-- | Assumes that Ids have one PrimRep, which holds after unarisation.</span><span>
</span><span id="line-177"></span><span class="hs-comment">-- See Note [Post-unarisation invariants]</span><span>
</span><span id="line-178"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#addIdReps"><span class="hs-identifier hs-type">addIdReps</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-type">NonVoid</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-type">NonVoid</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCon.html#PrimRep"><span class="hs-identifier hs-type">PrimRep</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-179"></span><span id="addIdReps"><span class="annot"><span class="annottext">addIdReps :: [NonVoid Id] -&gt; [NonVoid (PrimRep, Id)]
</span><a href="GHC.StgToCmm.Closure.html#addIdReps"><span class="hs-identifier hs-var hs-var">addIdReps</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(NonVoid Id -&gt; NonVoid (PrimRep, Id))
-&gt; [NonVoid Id] -&gt; [NonVoid (PrimRep, Id)]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681004108"><span class="annot"><span class="annottext">NonVoid Id
</span><a href="#local-6989586621681004108"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681004107"><span class="annot"><span class="annottext">id' :: Id
</span><a href="#local-6989586621681004107"><span class="hs-identifier hs-var hs-var">id'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NonVoid Id -&gt; Id
forall a. NonVoid a -&gt; a
</span><a href="GHC.StgToCmm.Closure.html#fromNonVoid"><span class="hs-identifier hs-var">fromNonVoid</span></a></span><span> </span><span class="annot"><span class="annottext">NonVoid Id
</span><a href="#local-6989586621681004108"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-180"></span><span>                         </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">(PrimRep, Id) -&gt; NonVoid (PrimRep, Id)
forall a. a -&gt; NonVoid a
</span><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-var">NonVoid</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; PrimRep
</span><a href="GHC.StgToCmm.Closure.html#idPrimRep"><span class="hs-identifier hs-var">idPrimRep</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681004107"><span class="hs-identifier hs-var">id'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681004107"><span class="hs-identifier hs-var">id'</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-181"></span><span>
</span><span id="line-182"></span><span class="hs-comment">-- | Assumes that arguments have one PrimRep, which holds after unarisation.</span><span>
</span><span id="line-183"></span><span class="hs-comment">-- See Note [Post-unarisation invariants]</span><span>
</span><span id="line-184"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#addArgReps"><span class="hs-identifier hs-type">addArgReps</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-type">NonVoid</span></a></span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html#StgArg"><span class="hs-identifier hs-type">StgArg</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-type">NonVoid</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCon.html#PrimRep"><span class="hs-identifier hs-type">PrimRep</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html#StgArg"><span class="hs-identifier hs-type">StgArg</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-185"></span><span id="addArgReps"><span class="annot"><span class="annottext">addArgReps :: [NonVoid StgArg] -&gt; [NonVoid (PrimRep, StgArg)]
</span><a href="GHC.StgToCmm.Closure.html#addArgReps"><span class="hs-identifier hs-var hs-var">addArgReps</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(NonVoid StgArg -&gt; NonVoid (PrimRep, StgArg))
-&gt; [NonVoid StgArg] -&gt; [NonVoid (PrimRep, StgArg)]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681004106"><span class="annot"><span class="annottext">NonVoid StgArg
</span><a href="#local-6989586621681004106"><span class="hs-identifier hs-var">arg</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681004105"><span class="annot"><span class="annottext">arg' :: StgArg
</span><a href="#local-6989586621681004105"><span class="hs-identifier hs-var hs-var">arg'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NonVoid StgArg -&gt; StgArg
forall a. NonVoid a -&gt; a
</span><a href="GHC.StgToCmm.Closure.html#fromNonVoid"><span class="hs-identifier hs-var">fromNonVoid</span></a></span><span> </span><span class="annot"><span class="annottext">NonVoid StgArg
</span><a href="#local-6989586621681004106"><span class="hs-identifier hs-var">arg</span></a></span><span>
</span><span id="line-186"></span><span>                           </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">(PrimRep, StgArg) -&gt; NonVoid (PrimRep, StgArg)
forall a. a -&gt; NonVoid a
</span><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-var">NonVoid</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">StgArg -&gt; PrimRep
</span><a href="GHC.StgToCmm.Closure.html#argPrimRep"><span class="hs-identifier hs-var">argPrimRep</span></a></span><span> </span><span class="annot"><span class="annottext">StgArg
</span><a href="#local-6989586621681004105"><span class="hs-identifier hs-var">arg'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">StgArg
</span><a href="#local-6989586621681004105"><span class="hs-identifier hs-var">arg'</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-187"></span><span>
</span><span id="line-188"></span><span class="hs-comment">-- | Assumes that the argument has one PrimRep, which holds after unarisation.</span><span>
</span><span id="line-189"></span><span class="hs-comment">-- See Note [Post-unarisation invariants]</span><span>
</span><span id="line-190"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#argPrimRep"><span class="hs-identifier hs-type">argPrimRep</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html#StgArg"><span class="hs-identifier hs-type">StgArg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html#PrimRep"><span class="hs-identifier hs-type">PrimRep</span></a></span><span>
</span><span id="line-191"></span><span id="argPrimRep"><span class="annot"><span class="annottext">argPrimRep :: StgArg -&gt; PrimRep
</span><a href="GHC.StgToCmm.Closure.html#argPrimRep"><span class="hs-identifier hs-var hs-var">argPrimRep</span></a></span></span><span> </span><span id="local-6989586621681004104"><span class="annot"><span class="annottext">StgArg
</span><a href="#local-6989586621681004104"><span class="hs-identifier hs-var">arg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Type -&gt; PrimRep
Type -&gt; PrimRep
</span><a href="GHC.Types.RepType.html#typePrimRep1"><span class="hs-identifier hs-var">typePrimRep1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">StgArg -&gt; Type
</span><a href="GHC.Stg.Syntax.html#stgArgType"><span class="hs-identifier hs-var">stgArgType</span></a></span><span> </span><span class="annot"><span class="annottext">StgArg
</span><a href="#local-6989586621681004104"><span class="hs-identifier hs-var">arg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-192"></span><span>
</span><span id="line-193"></span><span class="hs-comment">------------------------------------------------------</span><span>
</span><span id="line-194"></span><span class="hs-comment">--                Building LambdaFormInfo</span><span>
</span><span id="line-195"></span><span class="hs-comment">------------------------------------------------------</span><span>
</span><span id="line-196"></span><span>
</span><span id="line-197"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#mkLFArgument"><span class="hs-identifier hs-type">mkLFArgument</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span>
</span><span id="line-198"></span><span id="mkLFArgument"><span class="annot"><span class="annottext">mkLFArgument :: Id -&gt; LambdaFormInfo
</span><a href="GHC.StgToCmm.Closure.html#mkLFArgument"><span class="hs-identifier hs-var hs-var">mkLFArgument</span></a></span></span><span> </span><span id="local-6989586621681004103"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681004103"><span class="hs-identifier hs-var">id</span></a></span></span><span>
</span><span id="line-199"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Type -&gt; Bool
Type -&gt; Bool
</span><a href="GHC.Core.Type.html#isUnliftedType"><span class="hs-identifier hs-var">isUnliftedType</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681004101"><span class="hs-identifier hs-var">ty</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="GHC.StgToCmm.Types.html#LFUnlifted"><span class="hs-identifier hs-var">LFUnlifted</span></a></span><span>
</span><span id="line-200"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Type -&gt; Bool
</span><a href="GHC.StgToCmm.Closure.html#might_be_a_function"><span class="hs-identifier hs-var">might_be_a_function</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681004101"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; LambdaFormInfo
</span><a href="GHC.StgToCmm.Types.html#LFUnknown"><span class="hs-identifier hs-var">LFUnknown</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-201"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; LambdaFormInfo
</span><a href="GHC.StgToCmm.Types.html#LFUnknown"><span class="hs-identifier hs-var">LFUnknown</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-202"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-203"></span><span>    </span><span id="local-6989586621681004101"><span class="annot"><span class="annottext">ty :: Type
</span><a href="#local-6989586621681004101"><span class="hs-identifier hs-var hs-var">ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Type
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var">idType</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681004103"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-204"></span><span>
</span><span id="line-205"></span><span class="hs-comment">-------------</span><span>
</span><span id="line-206"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#mkLFLetNoEscape"><span class="hs-identifier hs-type">mkLFLetNoEscape</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span>
</span><span id="line-207"></span><span id="mkLFLetNoEscape"><span class="annot"><span class="annottext">mkLFLetNoEscape :: LambdaFormInfo
</span><a href="GHC.StgToCmm.Closure.html#mkLFLetNoEscape"><span class="hs-identifier hs-var hs-var">mkLFLetNoEscape</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="GHC.StgToCmm.Types.html#LFLetNoEscape"><span class="hs-identifier hs-var">LFLetNoEscape</span></a></span><span>
</span><span id="line-208"></span><span>
</span><span id="line-209"></span><span class="hs-comment">-------------</span><span>
</span><span id="line-210"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#mkLFReEntrant"><span class="hs-identifier hs-type">mkLFReEntrant</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#TopLevelFlag"><span class="hs-identifier hs-type">TopLevelFlag</span></a></span><span>    </span><span class="hs-comment">-- True of top level</span><span>
</span><span id="line-211"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span>            </span><span class="hs-comment">-- Free vars</span><span>
</span><span id="line-212"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span>            </span><span class="hs-comment">-- Args</span><span>
</span><span id="line-213"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#ArgDescr"><span class="hs-identifier hs-type">ArgDescr</span></a></span><span>        </span><span class="hs-comment">-- Argument descriptor</span><span>
</span><span id="line-214"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span>
</span><span id="line-215"></span><span>
</span><span id="line-216"></span><span id="mkLFReEntrant"><span class="annot"><span class="annottext">mkLFReEntrant :: TopLevelFlag -&gt; [Id] -&gt; [Id] -&gt; ArgDescr -&gt; LambdaFormInfo
</span><a href="GHC.StgToCmm.Closure.html#mkLFReEntrant"><span class="hs-identifier hs-var hs-var">mkLFReEntrant</span></a></span></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">ArgDescr
</span><span class="hs-identifier">_</span></span><span>
</span><span id="line-217"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; LambdaFormInfo
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;mkLFReEntrant&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>
</span><span id="line-218"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#mkLFReEntrant"><span class="hs-identifier hs-var">mkLFReEntrant</span></a></span><span> </span><span id="local-6989586621681004095"><span class="annot"><span class="annottext">TopLevelFlag
</span><a href="#local-6989586621681004095"><span class="hs-identifier hs-var">top</span></a></span></span><span> </span><span id="local-6989586621681004094"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681004094"><span class="hs-identifier hs-var">fvs</span></a></span></span><span> </span><span id="local-6989586621681004093"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681004093"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span id="local-6989586621681004092"><span class="annot"><span class="annottext">ArgDescr
</span><a href="#local-6989586621681004092"><span class="hs-identifier hs-var">arg_descr</span></a></span></span><span>
</span><span id="line-219"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TopLevelFlag -&gt; RepArity -&gt; Bool -&gt; ArgDescr -&gt; LambdaFormInfo
</span><a href="GHC.StgToCmm.Types.html#LFReEntrant"><span class="hs-identifier hs-var">LFReEntrant</span></a></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><a href="#local-6989586621681004095"><span class="hs-identifier hs-var">top</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Id] -&gt; RepArity
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; RepArity
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681004093"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Id] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681004094"><span class="hs-identifier hs-var">fvs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ArgDescr
</span><a href="#local-6989586621681004092"><span class="hs-identifier hs-var">arg_descr</span></a></span><span>
</span><span id="line-220"></span><span>
</span><span id="line-221"></span><span class="hs-comment">-------------</span><span>
</span><span id="line-222"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#mkLFThunk"><span class="hs-identifier hs-type">mkLFThunk</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#TopLevelFlag"><span class="hs-identifier hs-type">TopLevelFlag</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html#UpdateFlag"><span class="hs-identifier hs-type">UpdateFlag</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span>
</span><span id="line-223"></span><span id="mkLFThunk"><span class="annot"><span class="annottext">mkLFThunk :: Type -&gt; TopLevelFlag -&gt; [Id] -&gt; UpdateFlag -&gt; LambdaFormInfo
</span><a href="GHC.StgToCmm.Closure.html#mkLFThunk"><span class="hs-identifier hs-var hs-var">mkLFThunk</span></a></span></span><span> </span><span id="local-6989586621681004089"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681004089"><span class="hs-identifier hs-var">thunk_ty</span></a></span></span><span> </span><span id="local-6989586621681004088"><span class="annot"><span class="annottext">TopLevelFlag
</span><a href="#local-6989586621681004088"><span class="hs-identifier hs-var">top</span></a></span></span><span> </span><span id="local-6989586621681004087"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681004087"><span class="hs-identifier hs-var">fvs</span></a></span></span><span> </span><span id="local-6989586621681004086"><span class="annot"><span class="annottext">UpdateFlag
</span><a href="#local-6989586621681004086"><span class="hs-identifier hs-var">upd_flag</span></a></span></span><span>
</span><span id="line-224"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">not</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">isUpdatable</span><span> </span><span class="hs-identifier">upd_flag</span><span class="hs-special">)</span><span> </span><span class="hs-operator">||</span><span> </span><span class="hs-identifier">not</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">isUnliftedType</span><span> </span><span class="hs-identifier">thunk_ty</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-225"></span><span>    </span><span class="annot"><span class="annottext">TopLevelFlag
-&gt; Bool -&gt; Bool -&gt; StandardFormInfo -&gt; Bool -&gt; LambdaFormInfo
</span><a href="GHC.StgToCmm.Types.html#LFThunk"><span class="hs-identifier hs-var">LFThunk</span></a></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><a href="#local-6989586621681004088"><span class="hs-identifier hs-var">top</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Id] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681004087"><span class="hs-identifier hs-var">fvs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-226"></span><span>            </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UpdateFlag -&gt; Bool
</span><a href="GHC.Stg.Syntax.html#isUpdatable"><span class="hs-identifier hs-var">isUpdatable</span></a></span><span> </span><span class="annot"><span class="annottext">UpdateFlag
</span><a href="#local-6989586621681004086"><span class="hs-identifier hs-var">upd_flag</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-227"></span><span>            </span><span class="annot"><span class="annottext">StandardFormInfo
</span><a href="GHC.StgToCmm.Types.html#NonStandardThunk"><span class="hs-identifier hs-var">NonStandardThunk</span></a></span><span>
</span><span id="line-228"></span><span>            </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; Bool
</span><a href="GHC.StgToCmm.Closure.html#might_be_a_function"><span class="hs-identifier hs-var">might_be_a_function</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681004089"><span class="hs-identifier hs-var">thunk_ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-229"></span><span>
</span><span id="line-230"></span><span class="hs-comment">--------------</span><span>
</span><span id="line-231"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#might_be_a_function"><span class="hs-identifier hs-type">might_be_a_function</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-232"></span><span class="hs-comment">-- Return False only if we are *sure* it's a data type</span><span>
</span><span id="line-233"></span><span class="hs-comment">-- Look through newtypes etc as much as poss</span><span>
</span><span id="line-234"></span><span id="might_be_a_function"><span class="annot"><span class="annottext">might_be_a_function :: Type -&gt; Bool
</span><a href="GHC.StgToCmm.Closure.html#might_be_a_function"><span class="hs-identifier hs-var hs-var">might_be_a_function</span></a></span></span><span> </span><span id="local-6989586621681004081"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681004081"><span class="hs-identifier hs-var">ty</span></a></span></span><span>
</span><span id="line-235"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">PrimRep
</span><a href="GHC.Core.TyCon.html#LiftedRep"><span class="hs-identifier hs-var">LiftedRep</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Type -&gt; [PrimRep]
Type -&gt; [PrimRep]
</span><a href="GHC.Types.RepType.html#typePrimRep"><span class="hs-identifier hs-var">typePrimRep</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681004081"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-236"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681004078"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681004078"><span class="hs-identifier hs-var">tc</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Type -&gt; Maybe TyCon
</span><a href="GHC.Core.Type.html#tyConAppTyCon_maybe"><span class="hs-identifier hs-var">tyConAppTyCon_maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; Type
</span><a href="GHC.Types.RepType.html#unwrapType"><span class="hs-identifier hs-var">unwrapType</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681004081"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-237"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Bool
</span><a href="GHC.Core.TyCon.html#isDataTyCon"><span class="hs-identifier hs-var">isDataTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681004078"><span class="hs-identifier hs-var">tc</span></a></span><span>
</span><span id="line-238"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-239"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-240"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-241"></span><span>
</span><span id="line-242"></span><span class="hs-comment">-------------</span><span>
</span><span id="line-243"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#mkConLFInfo"><span class="hs-identifier hs-type">mkConLFInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span>
</span><span id="line-244"></span><span id="mkConLFInfo"><span class="annot"><span class="annottext">mkConLFInfo :: DataCon -&gt; LambdaFormInfo
</span><a href="GHC.StgToCmm.Closure.html#mkConLFInfo"><span class="hs-identifier hs-var hs-var">mkConLFInfo</span></a></span></span><span> </span><span id="local-6989586621681004074"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681004074"><span class="hs-identifier hs-var">con</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; LambdaFormInfo
</span><a href="GHC.StgToCmm.Types.html#LFCon"><span class="hs-identifier hs-var">LFCon</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681004074"><span class="hs-identifier hs-var">con</span></a></span><span>
</span><span id="line-245"></span><span>
</span><span id="line-246"></span><span class="hs-comment">-------------</span><span>
</span><span id="line-247"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#mkSelectorLFInfo"><span class="hs-identifier hs-type">mkSelectorLFInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span>
</span><span id="line-248"></span><span id="mkSelectorLFInfo"><span class="annot"><span class="annottext">mkSelectorLFInfo :: Id -&gt; RepArity -&gt; Bool -&gt; LambdaFormInfo
</span><a href="GHC.StgToCmm.Closure.html#mkSelectorLFInfo"><span class="hs-identifier hs-var hs-var">mkSelectorLFInfo</span></a></span></span><span> </span><span id="local-6989586621681004072"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681004072"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621681004071"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681004071"><span class="hs-identifier hs-var">offset</span></a></span></span><span> </span><span id="local-6989586621681004070"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681004070"><span class="hs-identifier hs-var">updatable</span></a></span></span><span>
</span><span id="line-249"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
-&gt; Bool -&gt; Bool -&gt; StandardFormInfo -&gt; Bool -&gt; LambdaFormInfo
</span><a href="GHC.StgToCmm.Types.html#LFThunk"><span class="hs-identifier hs-var">LFThunk</span></a></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><a href="GHC.Types.Basic.html#NotTopLevel"><span class="hs-identifier hs-var">NotTopLevel</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681004070"><span class="hs-identifier hs-var">updatable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RepArity -&gt; StandardFormInfo
</span><a href="GHC.StgToCmm.Types.html#SelectorThunk"><span class="hs-identifier hs-var">SelectorThunk</span></a></span><span> </span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681004071"><span class="hs-identifier hs-var">offset</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-250"></span><span>        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; Bool
</span><a href="GHC.StgToCmm.Closure.html#might_be_a_function"><span class="hs-identifier hs-var">might_be_a_function</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Type
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var">idType</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681004072"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-251"></span><span>
</span><span id="line-252"></span><span class="hs-comment">-------------</span><span>
</span><span id="line-253"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#mkApLFInfo"><span class="hs-identifier hs-type">mkApLFInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html#UpdateFlag"><span class="hs-identifier hs-type">UpdateFlag</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Arity"><span class="hs-identifier hs-type">Arity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span>
</span><span id="line-254"></span><span id="mkApLFInfo"><span class="annot"><span class="annottext">mkApLFInfo :: Id -&gt; UpdateFlag -&gt; RepArity -&gt; LambdaFormInfo
</span><a href="GHC.StgToCmm.Closure.html#mkApLFInfo"><span class="hs-identifier hs-var hs-var">mkApLFInfo</span></a></span></span><span> </span><span id="local-6989586621681004066"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681004066"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621681004065"><span class="annot"><span class="annottext">UpdateFlag
</span><a href="#local-6989586621681004065"><span class="hs-identifier hs-var">upd_flag</span></a></span></span><span> </span><span id="local-6989586621681004064"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681004064"><span class="hs-identifier hs-var">arity</span></a></span></span><span>
</span><span id="line-255"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
-&gt; Bool -&gt; Bool -&gt; StandardFormInfo -&gt; Bool -&gt; LambdaFormInfo
</span><a href="GHC.StgToCmm.Types.html#LFThunk"><span class="hs-identifier hs-var">LFThunk</span></a></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><a href="GHC.Types.Basic.html#NotTopLevel"><span class="hs-identifier hs-var">NotTopLevel</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681004064"><span class="hs-identifier hs-var">arity</span></a></span><span> </span><span class="annot"><span class="annottext">RepArity -&gt; RepArity -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">RepArity
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UpdateFlag -&gt; Bool
</span><a href="GHC.Stg.Syntax.html#isUpdatable"><span class="hs-identifier hs-var">isUpdatable</span></a></span><span> </span><span class="annot"><span class="annottext">UpdateFlag
</span><a href="#local-6989586621681004065"><span class="hs-identifier hs-var">upd_flag</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RepArity -&gt; StandardFormInfo
</span><a href="GHC.StgToCmm.Types.html#ApThunk"><span class="hs-identifier hs-var">ApThunk</span></a></span><span> </span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681004064"><span class="hs-identifier hs-var">arity</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-256"></span><span>        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; Bool
</span><a href="GHC.StgToCmm.Closure.html#might_be_a_function"><span class="hs-identifier hs-var">might_be_a_function</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Type
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var">idType</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681004066"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-257"></span><span>
</span><span id="line-258"></span><span class="hs-comment">-------------</span><span>
</span><span id="line-259"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#mkLFImported"><span class="hs-identifier hs-type">mkLFImported</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span>
</span><span id="line-260"></span><span id="mkLFImported"><span class="annot"><span class="annottext">mkLFImported :: Id -&gt; LambdaFormInfo
</span><a href="GHC.StgToCmm.Closure.html#mkLFImported"><span class="hs-identifier hs-var hs-var">mkLFImported</span></a></span></span><span> </span><span id="local-6989586621681004062"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681004062"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-261"></span><span>    </span><span class="hs-comment">-- See Note [Conveying CAF-info and LFInfo between modules] in</span><span>
</span><span id="line-262"></span><span>    </span><span class="hs-comment">-- GHC.StgToCmm.Types</span><span>
</span><span id="line-263"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Maybe LambdaFormInfo
</span><a href="GHC.Types.Id.html#idLFInfo_maybe"><span class="hs-identifier hs-var">idLFInfo_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681004062"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-264"></span><span>      </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681004060"><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681004060"><span class="hs-identifier hs-var">lf_info</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-265"></span><span>        </span><span class="hs-comment">-- Use the LambdaFormInfo from the interface</span><span>
</span><span id="line-266"></span><span>        </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681004060"><span class="hs-identifier hs-var">lf_info</span></a></span><span>
</span><span id="line-267"></span><span>      </span><span class="annot"><span class="annottext">Maybe LambdaFormInfo
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-268"></span><span>        </span><span class="hs-comment">-- Interface doesn't have a LambdaFormInfo, make a conservative one from</span><span>
</span><span id="line-269"></span><span>        </span><span class="hs-comment">-- the type.</span><span>
</span><span id="line-270"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681004059"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681004059"><span class="hs-identifier hs-var">con</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Maybe DataCon
</span><a href="GHC.Types.Id.html#isDataConWorkId_maybe"><span class="hs-identifier hs-var">isDataConWorkId_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681004062"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-271"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Bool
</span><a href="GHC.Core.DataCon.html#isNullaryRepDataCon"><span class="hs-identifier hs-var">isNullaryRepDataCon</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681004059"><span class="hs-identifier hs-var">con</span></a></span><span>
</span><span id="line-272"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; LambdaFormInfo
</span><a href="GHC.StgToCmm.Types.html#LFCon"><span class="hs-identifier hs-var">LFCon</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681004059"><span class="hs-identifier hs-var">con</span></a></span><span>   </span><span class="hs-comment">-- An imported nullary constructor</span><span>
</span><span id="line-273"></span><span>                       </span><span class="hs-comment">-- We assume that the constructor is evaluated so that</span><span>
</span><span id="line-274"></span><span>                       </span><span class="hs-comment">-- the id really does point directly to the constructor</span><span>
</span><span id="line-275"></span><span>
</span><span id="line-276"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681004056"><span class="hs-identifier hs-var">arity</span></a></span><span> </span><span class="annot"><span class="annottext">RepArity -&gt; RepArity -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;</span></span><span> </span><span class="annot"><span class="annottext">RepArity
</span><span class="hs-number">0</span></span><span>
</span><span id="line-277"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">TopLevelFlag -&gt; RepArity -&gt; Bool -&gt; ArgDescr -&gt; LambdaFormInfo
</span><a href="GHC.StgToCmm.Types.html#LFReEntrant"><span class="hs-identifier hs-var">LFReEntrant</span></a></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><a href="GHC.Types.Basic.html#TopLevel"><span class="hs-identifier hs-var">TopLevel</span></a></span><span> </span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681004056"><span class="hs-identifier hs-var">arity</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="annot"><span class="annottext">ArgDescr
</span><a href="GHC.StgToCmm.Types.html#ArgUnknown"><span class="hs-identifier hs-var">ArgUnknown</span></a></span><span>
</span><span id="line-278"></span><span>
</span><span id="line-279"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-280"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Id -&gt; LambdaFormInfo
</span><a href="GHC.StgToCmm.Closure.html#mkLFArgument"><span class="hs-identifier hs-var">mkLFArgument</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681004062"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-comment">-- Not sure of exact arity</span><span>
</span><span id="line-281"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-282"></span><span>    </span><span id="local-6989586621681004056"><span class="annot"><span class="annottext">arity :: RepArity
</span><a href="#local-6989586621681004056"><span class="hs-identifier hs-var hs-var">arity</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; RepArity
</span><a href="GHC.Types.Id.html#idFunRepArity"><span class="hs-identifier hs-var">idFunRepArity</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681004062"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-283"></span><span>
</span><span id="line-284"></span><span class="hs-comment">-------------</span><span>
</span><span id="line-285"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#mkLFStringLit"><span class="hs-identifier hs-type">mkLFStringLit</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span>
</span><span id="line-286"></span><span id="mkLFStringLit"><span class="annot"><span class="annottext">mkLFStringLit :: LambdaFormInfo
</span><a href="GHC.StgToCmm.Closure.html#mkLFStringLit"><span class="hs-identifier hs-var hs-var">mkLFStringLit</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="GHC.StgToCmm.Types.html#LFUnlifted"><span class="hs-identifier hs-var">LFUnlifted</span></a></span><span>
</span><span id="line-287"></span><span>
</span><span id="line-288"></span><span class="hs-comment">-----------------------------------------------------</span><span>
</span><span id="line-289"></span><span class="hs-comment">--                Dynamic pointer tagging</span><span>
</span><span id="line-290"></span><span class="hs-comment">-----------------------------------------------------</span><span>
</span><span id="line-291"></span><span>
</span><span id="line-292"></span><span class="hs-keyword">type</span><span> </span><span id="DynTag"><span class="annot"><a href="GHC.StgToCmm.Closure.html#DynTag"><span class="hs-identifier hs-var">DynTag</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>       </span><span class="hs-comment">-- The tag on a *pointer*</span><span>
</span><span id="line-293"></span><span>                        </span><span class="hs-comment">-- (from the dynamic-tagging paper)</span><span>
</span><span id="line-294"></span><span>
</span><span id="line-295"></span><span class="hs-comment">-- Note [Data constructor dynamic tags]</span><span>
</span><span id="line-296"></span><span class="hs-comment">-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span><span>
</span><span id="line-297"></span><span class="hs-comment">--</span><span>
</span><span id="line-298"></span><span class="hs-comment">-- The family size of a data type (the number of constructors</span><span>
</span><span id="line-299"></span><span class="hs-comment">-- or the arity of a function) can be either:</span><span>
</span><span id="line-300"></span><span class="hs-comment">--    * small, if the family size &lt; 2**tag_bits</span><span>
</span><span id="line-301"></span><span class="hs-comment">--    * big, otherwise.</span><span>
</span><span id="line-302"></span><span class="hs-comment">--</span><span>
</span><span id="line-303"></span><span class="hs-comment">-- Small families can have the constructor tag in the tag bits.</span><span>
</span><span id="line-304"></span><span class="hs-comment">-- Big families always use the tag values 1..mAX_PTR_TAG to represent</span><span>
</span><span id="line-305"></span><span class="hs-comment">-- evaluatedness, the last one lumping together all overflowing ones.</span><span>
</span><span id="line-306"></span><span class="hs-comment">-- We don't have very many tag bits: for example, we have 2 bits on</span><span>
</span><span id="line-307"></span><span class="hs-comment">-- x86-32 and 3 bits on x86-64.</span><span>
</span><span id="line-308"></span><span class="hs-comment">--</span><span>
</span><span id="line-309"></span><span class="hs-comment">-- Also see Note [Tagging big families] in GHC.StgToCmm.Expr</span><span>
</span><span id="line-310"></span><span>
</span><span id="line-311"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#isSmallFamily"><span class="hs-identifier hs-type">isSmallFamily</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-312"></span><span id="isSmallFamily"><span class="annot"><span class="annottext">isSmallFamily :: DynFlags -&gt; RepArity -&gt; Bool
</span><a href="GHC.StgToCmm.Closure.html#isSmallFamily"><span class="hs-identifier hs-var hs-var">isSmallFamily</span></a></span></span><span> </span><span id="local-6989586621681004051"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681004051"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681004050"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681004050"><span class="hs-identifier hs-var">fam_size</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681004050"><span class="hs-identifier hs-var">fam_size</span></a></span><span> </span><span class="annot"><span class="annottext">RepArity -&gt; RepArity -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; RepArity
</span><a href="GHC.Driver.Session.html#mAX_PTR_TAG"><span class="hs-identifier hs-var">mAX_PTR_TAG</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681004051"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-313"></span><span>
</span><span id="line-314"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#tagForCon"><span class="hs-identifier hs-type">tagForCon</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#DynTag"><span class="hs-identifier hs-type">DynTag</span></a></span><span>
</span><span id="line-315"></span><span id="tagForCon"><span class="annot"><span class="annottext">tagForCon :: DynFlags -&gt; DataCon -&gt; RepArity
</span><a href="GHC.StgToCmm.Closure.html#tagForCon"><span class="hs-identifier hs-var hs-var">tagForCon</span></a></span></span><span> </span><span id="local-6989586621681004047"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681004047"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681004046"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681004046"><span class="hs-identifier hs-var">con</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RepArity -&gt; RepArity -&gt; RepArity
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><span class="hs-identifier hs-var">min</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; RepArity
</span><a href="GHC.Core.DataCon.html#dataConTag"><span class="hs-identifier hs-var">dataConTag</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681004046"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; RepArity
</span><a href="GHC.Driver.Session.html#mAX_PTR_TAG"><span class="hs-identifier hs-var">mAX_PTR_TAG</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681004047"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-316"></span><span class="hs-comment">-- NB: 1-indexed</span><span>
</span><span id="line-317"></span><span>
</span><span id="line-318"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#tagForArity"><span class="hs-identifier hs-type">tagForArity</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#RepArity"><span class="hs-identifier hs-type">RepArity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#DynTag"><span class="hs-identifier hs-type">DynTag</span></a></span><span>
</span><span id="line-319"></span><span id="tagForArity"><span class="annot"><span class="annottext">tagForArity :: DynFlags -&gt; RepArity -&gt; RepArity
</span><a href="GHC.StgToCmm.Closure.html#tagForArity"><span class="hs-identifier hs-var hs-var">tagForArity</span></a></span></span><span> </span><span id="local-6989586621681004043"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681004043"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681004042"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681004042"><span class="hs-identifier hs-var">arity</span></a></span></span><span>
</span><span id="line-320"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; RepArity -&gt; Bool
</span><a href="GHC.StgToCmm.Closure.html#isSmallFamily"><span class="hs-identifier hs-var">isSmallFamily</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681004043"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681004042"><span class="hs-identifier hs-var">arity</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681004042"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-321"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RepArity
</span><span class="hs-number">0</span></span><span>
</span><span id="line-322"></span><span>
</span><span id="line-323"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#lfDynTag"><span class="hs-identifier hs-type">lfDynTag</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#DynTag"><span class="hs-identifier hs-type">DynTag</span></a></span><span>
</span><span id="line-324"></span><span class="hs-comment">-- Return the tag in the low order bits of a variable bound</span><span>
</span><span id="line-325"></span><span class="hs-comment">-- to this LambdaForm</span><span>
</span><span id="line-326"></span><span id="lfDynTag"><span class="annot"><span class="annottext">lfDynTag :: DynFlags -&gt; LambdaFormInfo -&gt; RepArity
</span><a href="GHC.StgToCmm.Closure.html#lfDynTag"><span class="hs-identifier hs-var hs-var">lfDynTag</span></a></span></span><span> </span><span id="local-6989586621681004041"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681004041"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Types.html#LFCon"><span class="hs-identifier hs-type">LFCon</span></a></span><span> </span><span id="local-6989586621681004040"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681004040"><span class="hs-identifier hs-var">con</span></a></span></span><span class="hs-special">)</span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; DataCon -&gt; RepArity
</span><a href="GHC.StgToCmm.Closure.html#tagForCon"><span class="hs-identifier hs-var">tagForCon</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681004041"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681004040"><span class="hs-identifier hs-var">con</span></a></span><span>
</span><span id="line-327"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#lfDynTag"><span class="hs-identifier hs-var">lfDynTag</span></a></span><span> </span><span id="local-6989586621681004039"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681004039"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Types.html#LFReEntrant"><span class="hs-identifier hs-type">LFReEntrant</span></a></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681004038"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681004038"><span class="hs-identifier hs-var">arity</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ArgDescr
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; RepArity -&gt; RepArity
</span><a href="GHC.StgToCmm.Closure.html#tagForArity"><span class="hs-identifier hs-var">tagForArity</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681004039"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681004038"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-328"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#lfDynTag"><span class="hs-identifier hs-var">lfDynTag</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><span class="hs-identifier">_</span></span><span>      </span><span id="local-6989586621681004037"><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681004037"><span class="hs-identifier hs-var">_other</span></a></span></span><span>                    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RepArity
</span><span class="hs-number">0</span></span><span>
</span><span id="line-329"></span><span>
</span><span id="line-330"></span><span>
</span><span id="line-331"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-332"></span><span class="hs-comment">--                Observing LambdaFormInfo</span><span>
</span><span id="line-333"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-334"></span><span>
</span><span id="line-335"></span><span class="hs-comment">------------</span><span>
</span><span id="line-336"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#isLFThunk"><span class="hs-identifier hs-type">isLFThunk</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-337"></span><span id="isLFThunk"><span class="annot"><span class="annottext">isLFThunk :: LambdaFormInfo -&gt; Bool
</span><a href="GHC.StgToCmm.Closure.html#isLFThunk"><span class="hs-identifier hs-var hs-var">isLFThunk</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Types.html#LFThunk"><span class="hs-identifier hs-type">LFThunk</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-338"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#isLFThunk"><span class="hs-identifier hs-var">isLFThunk</span></a></span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-339"></span><span>
</span><span id="line-340"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#isLFReEntrant"><span class="hs-identifier hs-type">isLFReEntrant</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-341"></span><span id="isLFReEntrant"><span class="annot"><span class="annottext">isLFReEntrant :: LambdaFormInfo -&gt; Bool
</span><a href="GHC.StgToCmm.Closure.html#isLFReEntrant"><span class="hs-identifier hs-var hs-var">isLFReEntrant</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Types.html#LFReEntrant"><span class="hs-identifier hs-type">LFReEntrant</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-342"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#isLFReEntrant"><span class="hs-identifier hs-var">isLFReEntrant</span></a></span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><span class="hs-identifier">_</span></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-343"></span><span>
</span><span id="line-344"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-345"></span><span class="hs-comment">--                Choosing SM reps</span><span>
</span><span id="line-346"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-347"></span><span>
</span><span id="line-348"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#lfClosureType"><span class="hs-identifier hs-type">lfClosureType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ClosureTypeInfo"><span class="hs-identifier hs-type">ClosureTypeInfo</span></a></span><span>
</span><span id="line-349"></span><span id="lfClosureType"><span class="annot"><span class="annottext">lfClosureType :: LambdaFormInfo -&gt; ClosureTypeInfo
</span><a href="GHC.StgToCmm.Closure.html#lfClosureType"><span class="hs-identifier hs-var hs-var">lfClosureType</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Types.html#LFReEntrant"><span class="hs-identifier hs-type">LFReEntrant</span></a></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681004035"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681004035"><span class="hs-identifier hs-var">arity</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681004034"><span class="annot"><span class="annottext">ArgDescr
</span><a href="#local-6989586621681004034"><span class="hs-identifier hs-var">argd</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RepArity -&gt; ArgDescr -&gt; ClosureTypeInfo
</span><a href="GHC.Runtime.Heap.Layout.html#Fun"><span class="hs-identifier hs-var">Fun</span></a></span><span> </span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681004035"><span class="hs-identifier hs-var">arity</span></a></span><span> </span><span class="annot"><span class="annottext">ArgDescr
</span><a href="#local-6989586621681004034"><span class="hs-identifier hs-var">argd</span></a></span><span>
</span><span id="line-350"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#lfClosureType"><span class="hs-identifier hs-var">lfClosureType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Types.html#LFCon"><span class="hs-identifier hs-type">LFCon</span></a></span><span> </span><span id="local-6989586621681004032"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681004032"><span class="hs-identifier hs-var">con</span></a></span></span><span class="hs-special">)</span><span>                  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RepArity -&gt; ConstrDescription -&gt; ClosureTypeInfo
</span><a href="GHC.Runtime.Heap.Layout.html#Constr"><span class="hs-identifier hs-var">Constr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; RepArity
</span><a href="GHC.Core.DataCon.html#dataConTagZ"><span class="hs-identifier hs-var">dataConTagZ</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681004032"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-351"></span><span>                                                    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; ConstrDescription
</span><a href="GHC.Core.DataCon.html#dataConIdentity"><span class="hs-identifier hs-var">dataConIdentity</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681004032"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-352"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#lfClosureType"><span class="hs-identifier hs-var">lfClosureType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Types.html#LFThunk"><span class="hs-identifier hs-type">LFThunk</span></a></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681004028"><span class="annot"><span class="annottext">StandardFormInfo
</span><a href="#local-6989586621681004028"><span class="hs-identifier hs-var">is_sel</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">StandardFormInfo -&gt; ClosureTypeInfo
</span><a href="GHC.StgToCmm.Closure.html#thunkClosureType"><span class="hs-identifier hs-var">thunkClosureType</span></a></span><span> </span><span class="annot"><span class="annottext">StandardFormInfo
</span><a href="#local-6989586621681004028"><span class="hs-identifier hs-var">is_sel</span></a></span><span>
</span><span id="line-353"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#lfClosureType"><span class="hs-identifier hs-var">lfClosureType</span></a></span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><span class="hs-identifier">_</span></span><span>                            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; ClosureTypeInfo
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;lfClosureType&quot;</span></span><span>
</span><span id="line-354"></span><span>
</span><span id="line-355"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#thunkClosureType"><span class="hs-identifier hs-type">thunkClosureType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#StandardFormInfo"><span class="hs-identifier hs-type">StandardFormInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ClosureTypeInfo"><span class="hs-identifier hs-type">ClosureTypeInfo</span></a></span><span>
</span><span id="line-356"></span><span id="thunkClosureType"><span class="annot"><span class="annottext">thunkClosureType :: StandardFormInfo -&gt; ClosureTypeInfo
</span><a href="GHC.StgToCmm.Closure.html#thunkClosureType"><span class="hs-identifier hs-var hs-var">thunkClosureType</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Types.html#SelectorThunk"><span class="hs-identifier hs-type">SelectorThunk</span></a></span><span> </span><span id="local-6989586621681004025"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681004025"><span class="hs-identifier hs-var">off</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RepArity -&gt; ClosureTypeInfo
</span><a href="GHC.Runtime.Heap.Layout.html#ThunkSelector"><span class="hs-identifier hs-var">ThunkSelector</span></a></span><span> </span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681004025"><span class="hs-identifier hs-var">off</span></a></span><span>
</span><span id="line-357"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#thunkClosureType"><span class="hs-identifier hs-var">thunkClosureType</span></a></span><span> </span><span class="annot"><span class="annottext">StandardFormInfo
</span><span class="hs-identifier">_</span></span><span>                   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="GHC.Runtime.Heap.Layout.html#Thunk"><span class="hs-identifier hs-var">Thunk</span></a></span><span>
</span><span id="line-358"></span><span>
</span><span id="line-359"></span><span class="hs-comment">-- We *do* get non-updatable top-level thunks sometimes.  eg. f = g</span><span>
</span><span id="line-360"></span><span class="hs-comment">-- gets compiled to a jump to g (if g has non-zero arity), instead of</span><span>
</span><span id="line-361"></span><span class="hs-comment">-- messing around with update frames and PAPs.  We set the closure type</span><span>
</span><span id="line-362"></span><span class="hs-comment">-- to FUN_STATIC in this case.</span><span>
</span><span id="line-363"></span><span>
</span><span id="line-364"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-365"></span><span class="hs-comment">--                nodeMustPointToIt</span><span>
</span><span id="line-366"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-367"></span><span>
</span><span id="line-368"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#nodeMustPointToIt"><span class="hs-identifier hs-type">nodeMustPointToIt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-369"></span><span class="hs-comment">-- If nodeMustPointToIt is true, then the entry convention for</span><span>
</span><span id="line-370"></span><span class="hs-comment">-- this closure has R1 (the &quot;Node&quot; register) pointing to the</span><span>
</span><span id="line-371"></span><span class="hs-comment">-- closure itself --- the &quot;self&quot; argument</span><span>
</span><span id="line-372"></span><span>
</span><span id="line-373"></span><span id="nodeMustPointToIt"><span class="annot"><span class="annottext">nodeMustPointToIt :: DynFlags -&gt; LambdaFormInfo -&gt; Bool
</span><a href="GHC.StgToCmm.Closure.html#nodeMustPointToIt"><span class="hs-identifier hs-var hs-var">nodeMustPointToIt</span></a></span></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Types.html#LFReEntrant"><span class="hs-identifier hs-type">LFReEntrant</span></a></span><span> </span><span id="local-6989586621681004022"><span class="annot"><span class="annottext">TopLevelFlag
</span><a href="#local-6989586621681004022"><span class="hs-identifier hs-var">top</span></a></span></span><span> </span><span class="annot"><span class="annottext">RepArity
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681004021"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681004021"><span class="hs-identifier hs-var">no_fvs</span></a></span></span><span> </span><span class="annot"><span class="annottext">ArgDescr
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>
</span><span id="line-374"></span><span>  </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681004021"><span class="hs-identifier hs-var">no_fvs</span></a></span><span>          </span><span class="hs-comment">-- Certainly if it has fvs we need to point to it</span><span>
</span><span id="line-375"></span><span>  </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag -&gt; Bool
</span><a href="GHC.Types.Basic.html#isNotTopLevel"><span class="hs-identifier hs-var">isNotTopLevel</span></a></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><a href="#local-6989586621681004022"><span class="hs-identifier hs-var">top</span></a></span><span>   </span><span class="hs-comment">-- See Note [GC recovery]</span><span>
</span><span id="line-376"></span><span>        </span><span class="hs-comment">-- For lex_profiling we also access the cost centre for a</span><span>
</span><span id="line-377"></span><span>        </span><span class="hs-comment">-- non-inherited (i.e. non-top-level) function.</span><span>
</span><span id="line-378"></span><span>        </span><span class="hs-comment">-- The isNotTopLevel test above ensures this is ok.</span><span>
</span><span id="line-379"></span><span>
</span><span id="line-380"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#nodeMustPointToIt"><span class="hs-identifier hs-var">nodeMustPointToIt</span></a></span><span> </span><span id="local-6989586621681004019"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681004019"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Types.html#LFThunk"><span class="hs-identifier hs-type">LFThunk</span></a></span><span> </span><span id="local-6989586621681004018"><span class="annot"><span class="annottext">TopLevelFlag
</span><a href="#local-6989586621681004018"><span class="hs-identifier hs-var">top</span></a></span></span><span> </span><span id="local-6989586621681004017"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681004017"><span class="hs-identifier hs-var">no_fvs</span></a></span></span><span> </span><span id="local-6989586621681004016"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681004016"><span class="hs-identifier hs-var">updatable</span></a></span></span><span> </span><span class="annot"><span class="annottext">StandardFormInfo
</span><a href="GHC.StgToCmm.Types.html#NonStandardThunk"><span class="hs-identifier hs-var">NonStandardThunk</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>
</span><span id="line-381"></span><span>  </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681004017"><span class="hs-identifier hs-var">no_fvs</span></a></span><span>            </span><span class="hs-comment">-- Self parameter</span><span>
</span><span id="line-382"></span><span>  </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag -&gt; Bool
</span><a href="GHC.Types.Basic.html#isNotTopLevel"><span class="hs-identifier hs-var">isNotTopLevel</span></a></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><a href="#local-6989586621681004018"><span class="hs-identifier hs-var">top</span></a></span><span>     </span><span class="hs-comment">-- Note [GC recovery]</span><span>
</span><span id="line-383"></span><span>  </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681004016"><span class="hs-identifier hs-var">updatable</span></a></span><span>             </span><span class="hs-comment">-- Need to push update frame</span><span>
</span><span id="line-384"></span><span>  </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#sccProfilingEnabled"><span class="hs-identifier hs-var">sccProfilingEnabled</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681004019"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-385"></span><span>          </span><span class="hs-comment">-- For the non-updatable (single-entry case):</span><span>
</span><span id="line-386"></span><span>          </span><span class="hs-comment">--</span><span>
</span><span id="line-387"></span><span>          </span><span class="hs-comment">-- True if has fvs (in which case we need access to them, and we</span><span>
</span><span id="line-388"></span><span>          </span><span class="hs-comment">--                    should black-hole it)</span><span>
</span><span id="line-389"></span><span>          </span><span class="hs-comment">-- or profiling (in which case we need to recover the cost centre</span><span>
</span><span id="line-390"></span><span>          </span><span class="hs-comment">--                 from inside it)  ToDo: do we need this even for</span><span>
</span><span id="line-391"></span><span>          </span><span class="hs-comment">--                                    top-level thunks? If not,</span><span>
</span><span id="line-392"></span><span>          </span><span class="hs-comment">--                                    isNotTopLevel subsumes this</span><span>
</span><span id="line-393"></span><span>
</span><span id="line-394"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#nodeMustPointToIt"><span class="hs-identifier hs-var">nodeMustPointToIt</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Types.html#LFThunk"><span class="hs-identifier hs-type">LFThunk</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>        </span><span class="hs-comment">-- Node must point to a standard-form thunk</span><span>
</span><span id="line-395"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-396"></span><span>
</span><span id="line-397"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#nodeMustPointToIt"><span class="hs-identifier hs-var">nodeMustPointToIt</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Types.html#LFCon"><span class="hs-identifier hs-type">LFCon</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-398"></span><span>
</span><span id="line-399"></span><span>        </span><span class="hs-comment">-- Strictly speaking, the above two don't need Node to point</span><span>
</span><span id="line-400"></span><span>        </span><span class="hs-comment">-- to it if the arity = 0.  But this is a *really* unlikely</span><span>
</span><span id="line-401"></span><span>        </span><span class="hs-comment">-- situation.  If we know it's nil (say) and we are entering</span><span>
</span><span id="line-402"></span><span>        </span><span class="hs-comment">-- it. Eg: let x = [] in x then we will certainly have inlined</span><span>
</span><span id="line-403"></span><span>        </span><span class="hs-comment">-- x, since nil is a simple atom.  So we gain little by not</span><span>
</span><span id="line-404"></span><span>        </span><span class="hs-comment">-- having Node point to known zero-arity things.  On the other</span><span>
</span><span id="line-405"></span><span>        </span><span class="hs-comment">-- hand, we do lose something; Patrick's code for figuring out</span><span>
</span><span id="line-406"></span><span>        </span><span class="hs-comment">-- when something has been updated but not entered relies on</span><span>
</span><span id="line-407"></span><span>        </span><span class="hs-comment">-- having Node point to the result of an update.  SLPJ</span><span>
</span><span id="line-408"></span><span>        </span><span class="hs-comment">-- 27/11/92.</span><span>
</span><span id="line-409"></span><span>
</span><span id="line-410"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#nodeMustPointToIt"><span class="hs-identifier hs-var">nodeMustPointToIt</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Types.html#LFUnknown"><span class="hs-identifier hs-type">LFUnknown</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-411"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#nodeMustPointToIt"><span class="hs-identifier hs-var">nodeMustPointToIt</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="GHC.StgToCmm.Types.html#LFUnlifted"><span class="hs-identifier hs-var">LFUnlifted</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-412"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#nodeMustPointToIt"><span class="hs-identifier hs-var">nodeMustPointToIt</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="GHC.StgToCmm.Types.html#LFLetNoEscape"><span class="hs-identifier hs-var">LFLetNoEscape</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-413"></span><span>
</span><span id="line-414"></span><span class="hs-comment">{- Note [GC recovery]
~~~~~~~~~~~~~~~~~~~~~
If we a have a local let-binding (function or thunk)
   let f = &lt;body&gt; in ...
AND &lt;body&gt; allocates, then the heap-overflow check needs to know how
to re-start the evaluation.  It uses the &quot;self&quot; pointer to do this.
So even if there are no free variables in &lt;body&gt;, we still make
nodeMustPointToIt be True for non-top-level bindings.

Why do any such bindings exist?  After all, let-floating should have
floated them out.  Well, a clever optimiser might leave one there to
avoid a space leak, deliberately recomputing a thunk.  Also (and this
really does happen occasionally) let-floating may make a function f smaller
so it can be inlined, so now (f True) may generate a local no-fv closure.
This actually happened during bootstrapping GHC itself, with f=mkRdrFunBind
in GHC.Tc.Deriv.Generate.) -}</span><span>
</span><span id="line-430"></span><span>
</span><span id="line-431"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-432"></span><span class="hs-comment">--                getCallMethod</span><span>
</span><span id="line-433"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-434"></span><span>
</span><span id="line-435"></span><span class="hs-comment">{- The entry conventions depend on the type of closure being entered,
whether or not it has free variables, and whether we're running
sequentially or in parallel.

Closure                           Node   Argument   Enter
Characteristics              Par   Req'd  Passing    Via
---------------------------------------------------------------------------
Unknown                     &amp; no  &amp; yes &amp; stack     &amp; node
Known fun (&gt;1 arg), no fvs  &amp; no  &amp; no  &amp; registers &amp; fast entry (enough args)
                                                    &amp; slow entry (otherwise)
Known fun (&gt;1 arg), fvs     &amp; no  &amp; yes &amp; registers &amp; fast entry (enough args)
0 arg, no fvs \r,\s         &amp; no  &amp; no  &amp; n/a       &amp; direct entry
0 arg, no fvs \u            &amp; no  &amp; yes &amp; n/a       &amp; node
0 arg, fvs \r,\s,selector   &amp; no  &amp; yes &amp; n/a       &amp; node
0 arg, fvs \r,\s            &amp; no  &amp; yes &amp; n/a       &amp; direct entry
0 arg, fvs \u               &amp; no  &amp; yes &amp; n/a       &amp; node
Unknown                     &amp; yes &amp; yes &amp; stack     &amp; node
Known fun (&gt;1 arg), no fvs  &amp; yes &amp; no  &amp; registers &amp; fast entry (enough args)
                                                    &amp; slow entry (otherwise)
Known fun (&gt;1 arg), fvs     &amp; yes &amp; yes &amp; registers &amp; node
0 arg, fvs \r,\s,selector   &amp; yes &amp; yes &amp; n/a       &amp; node
0 arg, no fvs \r,\s         &amp; yes &amp; no  &amp; n/a       &amp; direct entry
0 arg, no fvs \u            &amp; yes &amp; yes &amp; n/a       &amp; node
0 arg, fvs \r,\s            &amp; yes &amp; yes &amp; n/a       &amp; node
0 arg, fvs \u               &amp; yes &amp; yes &amp; n/a       &amp; node

When black-holing, single-entry closures could also be entered via node
(rather than directly) to catch double-entry. -}</span><span>
</span><span id="line-463"></span><span>
</span><span id="line-464"></span><span class="hs-keyword">data</span><span> </span><span id="CallMethod"><span class="annot"><a href="GHC.StgToCmm.Closure.html#CallMethod"><span class="hs-identifier hs-var">CallMethod</span></a></span></span><span>
</span><span id="line-465"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="EnterIt"><span class="annot"><a href="GHC.StgToCmm.Closure.html#EnterIt"><span class="hs-identifier hs-var">EnterIt</span></a></span></span><span>             </span><span class="hs-comment">-- No args, not a function</span><span>
</span><span id="line-466"></span><span>
</span><span id="line-467"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="JumpToIt"><span class="annot"><a href="GHC.StgToCmm.Closure.html#JumpToIt"><span class="hs-identifier hs-var">JumpToIt</span></a></span></span><span> </span><span class="annot"><a href="GHC.Cmm.BlockId.html#BlockId"><span class="hs-identifier hs-type">BlockId</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Expr.html#LocalReg"><span class="hs-identifier hs-type">LocalReg</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-comment">-- A join point or a header of a local loop</span><span>
</span><span id="line-468"></span><span>
</span><span id="line-469"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ReturnIt"><span class="annot"><a href="GHC.StgToCmm.Closure.html#ReturnIt"><span class="hs-identifier hs-var">ReturnIt</span></a></span></span><span>            </span><span class="hs-comment">-- It's a value (function, unboxed value,</span><span>
</span><span id="line-470"></span><span>                        </span><span class="hs-comment">-- or constructor), so just return it.</span><span>
</span><span id="line-471"></span><span>
</span><span id="line-472"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="SlowCall"><span class="annot"><a href="GHC.StgToCmm.Closure.html#SlowCall"><span class="hs-identifier hs-var">SlowCall</span></a></span></span><span>                </span><span class="hs-comment">-- Unknown fun, or known fun with</span><span>
</span><span id="line-473"></span><span>                        </span><span class="hs-comment">-- too few args.</span><span>
</span><span id="line-474"></span><span>
</span><span id="line-475"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="DirectEntry"><span class="annot"><a href="GHC.StgToCmm.Closure.html#DirectEntry"><span class="hs-identifier hs-var">DirectEntry</span></a></span></span><span>         </span><span class="hs-comment">-- Jump directly, with args in regs</span><span>
</span><span id="line-476"></span><span>        </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span>          </span><span class="hs-comment">--   The code label</span><span>
</span><span id="line-477"></span><span>        </span><span class="annot"><a href="GHC.Types.Basic.html#RepArity"><span class="hs-identifier hs-type">RepArity</span></a></span><span>        </span><span class="hs-comment">--   Its arity</span><span>
</span><span id="line-478"></span><span>
</span><span id="line-479"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#getCallMethod"><span class="hs-identifier hs-type">getCallMethod</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span>
</span><span id="line-480"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>           </span><span class="hs-comment">-- Function being applied</span><span>
</span><span id="line-481"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>             </span><span class="hs-comment">-- Function Id used to chech if it can refer to</span><span>
</span><span id="line-482"></span><span>                                </span><span class="hs-comment">-- CAF's and whether the function is tail-calling</span><span>
</span><span id="line-483"></span><span>                                </span><span class="hs-comment">-- itself</span><span>
</span><span id="line-484"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span> </span><span class="hs-comment">-- Its info</span><span>
</span><span id="line-485"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#RepArity"><span class="hs-identifier hs-type">RepArity</span></a></span><span>       </span><span class="hs-comment">-- Number of available arguments</span><span>
</span><span id="line-486"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#RepArity"><span class="hs-identifier hs-type">RepArity</span></a></span><span>       </span><span class="hs-comment">-- Number of them being void arguments</span><span>
</span><span id="line-487"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#CgLoc"><span class="hs-identifier hs-type">CgLoc</span></a></span><span>          </span><span class="hs-comment">-- Passed in from cgIdApp so that we can</span><span>
</span><span id="line-488"></span><span>                                </span><span class="hs-comment">-- handle let-no-escape bindings and self-recursive</span><span>
</span><span id="line-489"></span><span>                                </span><span class="hs-comment">-- tail calls using the same data constructor,</span><span>
</span><span id="line-490"></span><span>                                </span><span class="hs-comment">-- JumpToIt. This saves us one case branch in</span><span>
</span><span id="line-491"></span><span>                                </span><span class="hs-comment">-- cgIdApp</span><span>
</span><span id="line-492"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#SelfLoopInfo"><span class="hs-identifier hs-type">SelfLoopInfo</span></a></span><span> </span><span class="hs-comment">-- can we perform a self-recursive tail call?</span><span>
</span><span id="line-493"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#CallMethod"><span class="hs-identifier hs-type">CallMethod</span></a></span><span>
</span><span id="line-494"></span><span>
</span><span id="line-495"></span><span id="getCallMethod"><span class="annot"><span class="annottext">getCallMethod :: DynFlags
-&gt; Name
-&gt; Id
-&gt; LambdaFormInfo
-&gt; RepArity
-&gt; RepArity
-&gt; CgLoc
-&gt; Maybe SelfLoopInfo
-&gt; CallMethod
</span><a href="GHC.StgToCmm.Closure.html#getCallMethod"><span class="hs-identifier hs-var hs-var">getCallMethod</span></a></span></span><span> </span><span id="local-6989586621681004009"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681004009"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="annot"><span class="annottext">Name
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681004008"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681004008"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681004007"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681004007"><span class="hs-identifier hs-var">n_args</span></a></span></span><span> </span><span id="local-6989586621681004006"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681004006"><span class="hs-identifier hs-var">v_args</span></a></span></span><span> </span><span id="local-6989586621681004005"><span class="annot"><span class="annottext">CgLoc
</span><a href="#local-6989586621681004005"><span class="hs-identifier hs-var">_cg_loc</span></a></span></span><span>
</span><span id="line-496"></span><span>              </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681004004"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681004004"><span class="hs-identifier hs-var">self_loop_id</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681004003"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681004003"><span class="hs-identifier hs-var">block_id</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681004002"><span class="annot"><span class="annottext">[LocalReg]
</span><a href="#local-6989586621681004002"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-497"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">GeneralFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#gopt"><span class="hs-identifier hs-var">gopt</span></a></span><span> </span><span class="annot"><span class="annottext">GeneralFlag
</span><a href="GHC.Driver.Flags.html#Opt_Loopification"><span class="hs-identifier hs-var">Opt_Loopification</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681004009"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-498"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681004008"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Id -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681004004"><span class="hs-identifier hs-var">self_loop_id</span></a></span><span>
</span><span id="line-499"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[LocalReg]
</span><a href="#local-6989586621681004002"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="annot"><span class="annottext">[LocalReg] -&gt; RepArity -&gt; Bool
forall a. [a] -&gt; RepArity -&gt; Bool
</span><a href="GHC.Utils.Misc.html#lengthIs"><span class="hs-operator hs-var">`lengthIs`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681004007"><span class="hs-identifier hs-var">n_args</span></a></span><span> </span><span class="annot"><span class="annottext">RepArity -&gt; RepArity -&gt; RepArity
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681004006"><span class="hs-identifier hs-var">v_args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-500"></span><span>  </span><span class="hs-comment">-- If these patterns match then we know that:</span><span>
</span><span id="line-501"></span><span>  </span><span class="hs-comment">--   * loopification optimisation is turned on</span><span>
</span><span id="line-502"></span><span>  </span><span class="hs-comment">--   * function is performing a self-recursive call in a tail position</span><span>
</span><span id="line-503"></span><span>  </span><span class="hs-comment">--   * number of non-void parameters of the function matches functions arity.</span><span>
</span><span id="line-504"></span><span>  </span><span class="hs-comment">-- See Note [Self-recursive tail calls] and Note [Void arguments in</span><span>
</span><span id="line-505"></span><span>  </span><span class="hs-comment">-- self-recursive tail calls] in GHC.StgToCmm.Expr for more details</span><span>
</span><span id="line-506"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BlockId -&gt; [LocalReg] -&gt; CallMethod
</span><a href="GHC.StgToCmm.Closure.html#JumpToIt"><span class="hs-identifier hs-var">JumpToIt</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681004003"><span class="hs-identifier hs-var">block_id</span></a></span><span> </span><span class="annot"><span class="annottext">[LocalReg]
</span><a href="#local-6989586621681004002"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-507"></span><span>
</span><span id="line-508"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#getCallMethod"><span class="hs-identifier hs-var">getCallMethod</span></a></span><span> </span><span id="local-6989586621681003998"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003998"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681003997"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681003997"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621681003996"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681003996"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Types.html#LFReEntrant"><span class="hs-identifier hs-type">LFReEntrant</span></a></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681003995"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003995"><span class="hs-identifier hs-var">arity</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ArgDescr
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681003994"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003994"><span class="hs-identifier hs-var">n_args</span></a></span></span><span> </span><span id="local-6989586621681003993"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003993"><span class="hs-identifier hs-var">_v_args</span></a></span></span><span> </span><span id="local-6989586621681003992"><span class="annot"><span class="annottext">CgLoc
</span><a href="#local-6989586621681003992"><span class="hs-identifier hs-var">_cg_loc</span></a></span></span><span>
</span><span id="line-509"></span><span>              </span><span id="local-6989586621681003991"><span class="annot"><span class="annottext">Maybe SelfLoopInfo
</span><a href="#local-6989586621681003991"><span class="hs-identifier hs-var">_self_loop_info</span></a></span></span><span>
</span><span id="line-510"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003994"><span class="hs-identifier hs-var">n_args</span></a></span><span> </span><span class="annot"><span class="annottext">RepArity -&gt; RepArity -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">RepArity
</span><span class="hs-number">0</span></span><span> </span><span class="hs-comment">-- No args at all</span><span>
</span><span id="line-511"></span><span>  </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#sccProfilingEnabled"><span class="hs-identifier hs-var">sccProfilingEnabled</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003998"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-512"></span><span>     </span><span class="hs-comment">-- See Note [Evaluating functions with profiling] in rts/Apply.cmm</span><span>
</span><span id="line-513"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">arity</span><span> </span><span class="hs-operator">/=</span><span> </span><span class="hs-number">0</span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-identifier">ReturnIt</span><span>
</span><span id="line-514"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003994"><span class="hs-identifier hs-var">n_args</span></a></span><span> </span><span class="annot"><span class="annottext">RepArity -&gt; RepArity -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003995"><span class="hs-identifier hs-var">arity</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CallMethod
</span><a href="GHC.StgToCmm.Closure.html#SlowCall"><span class="hs-identifier hs-var">SlowCall</span></a></span><span>        </span><span class="hs-comment">-- Not enough args</span><span>
</span><span id="line-515"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; RepArity -&gt; CallMethod
</span><a href="GHC.StgToCmm.Closure.html#DirectEntry"><span class="hs-identifier hs-var">DirectEntry</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; Name -&gt; CafInfo -&gt; CLabel
</span><a href="GHC.StgToCmm.Closure.html#enterIdLabel"><span class="hs-identifier hs-var">enterIdLabel</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; Platform
</span><a href="GHC.Driver.Session.html#targetPlatform"><span class="hs-identifier hs-var hs-var">targetPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003998"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681003997"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; CafInfo
</span><a href="GHC.Types.Id.html#idCafInfo"><span class="hs-identifier hs-var">idCafInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681003996"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003995"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-516"></span><span>
</span><span id="line-517"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#getCallMethod"><span class="hs-identifier hs-var">getCallMethod</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681003985"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681003985"><span class="hs-identifier hs-var">_name</span></a></span></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="GHC.StgToCmm.Types.html#LFUnlifted"><span class="hs-identifier hs-var">LFUnlifted</span></a></span><span> </span><span id="local-6989586621681003984"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003984"><span class="hs-identifier hs-var">n_args</span></a></span></span><span> </span><span id="local-6989586621681003983"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003983"><span class="hs-identifier hs-var">_v_args</span></a></span></span><span> </span><span id="local-6989586621681003982"><span class="annot"><span class="annottext">CgLoc
</span><a href="#local-6989586621681003982"><span class="hs-identifier hs-var">_cg_loc</span></a></span></span><span> </span><span id="local-6989586621681003981"><span class="annot"><span class="annottext">Maybe SelfLoopInfo
</span><a href="#local-6989586621681003981"><span class="hs-identifier hs-var">_self_loop_info</span></a></span></span><span>
</span><span id="line-518"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">n_args</span><span> </span><span class="hs-operator">==</span><span> </span><span class="hs-number">0</span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-identifier">ReturnIt</span><span>
</span><span id="line-519"></span><span>
</span><span id="line-520"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#getCallMethod"><span class="hs-identifier hs-var">getCallMethod</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681003980"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681003980"><span class="hs-identifier hs-var">_name</span></a></span></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Types.html#LFCon"><span class="hs-identifier hs-type">LFCon</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681003979"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003979"><span class="hs-identifier hs-var">n_args</span></a></span></span><span> </span><span id="local-6989586621681003978"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003978"><span class="hs-identifier hs-var">_v_args</span></a></span></span><span> </span><span id="local-6989586621681003977"><span class="annot"><span class="annottext">CgLoc
</span><a href="#local-6989586621681003977"><span class="hs-identifier hs-var">_cg_loc</span></a></span></span><span> </span><span id="local-6989586621681003976"><span class="annot"><span class="annottext">Maybe SelfLoopInfo
</span><a href="#local-6989586621681003976"><span class="hs-identifier hs-var">_self_loop_info</span></a></span></span><span>
</span><span id="line-521"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">n_args</span><span> </span><span class="hs-operator">==</span><span> </span><span class="hs-number">0</span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-identifier">ReturnIt</span><span>
</span><span id="line-522"></span><span>    </span><span class="hs-comment">-- n_args=0 because it'd be ill-typed to apply a saturated</span><span>
</span><span id="line-523"></span><span>    </span><span class="hs-comment">--          constructor application to anything</span><span>
</span><span id="line-524"></span><span>
</span><span id="line-525"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#getCallMethod"><span class="hs-identifier hs-var">getCallMethod</span></a></span><span> </span><span id="local-6989586621681003975"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003975"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681003974"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681003974"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621681003973"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681003973"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Types.html#LFThunk"><span class="hs-identifier hs-type">LFThunk</span></a></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681003972"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003972"><span class="hs-identifier hs-var">updatable</span></a></span></span><span> </span><span id="local-6989586621681003971"><span class="annot"><span class="annottext">StandardFormInfo
</span><a href="#local-6989586621681003971"><span class="hs-identifier hs-var">std_form_info</span></a></span></span><span> </span><span id="local-6989586621681003970"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003970"><span class="hs-identifier hs-var">is_fun</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-526"></span><span>              </span><span id="local-6989586621681003969"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003969"><span class="hs-identifier hs-var">n_args</span></a></span></span><span> </span><span id="local-6989586621681003968"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003968"><span class="hs-identifier hs-var">_v_args</span></a></span></span><span> </span><span id="local-6989586621681003967"><span class="annot"><span class="annottext">CgLoc
</span><a href="#local-6989586621681003967"><span class="hs-identifier hs-var">_cg_loc</span></a></span></span><span> </span><span id="local-6989586621681003966"><span class="annot"><span class="annottext">Maybe SelfLoopInfo
</span><a href="#local-6989586621681003966"><span class="hs-identifier hs-var">_self_loop_info</span></a></span></span><span>
</span><span id="line-527"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003970"><span class="hs-identifier hs-var">is_fun</span></a></span><span>      </span><span class="hs-comment">-- it *might* be a function, so we must &quot;call&quot; it (which is always safe)</span><span>
</span><span id="line-528"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CallMethod
</span><a href="GHC.StgToCmm.Closure.html#SlowCall"><span class="hs-identifier hs-var">SlowCall</span></a></span><span>    </span><span class="hs-comment">-- We cannot just enter it [in eval/apply, the entry code</span><span>
</span><span id="line-529"></span><span>                </span><span class="hs-comment">-- is the fast-entry code]</span><span>
</span><span id="line-530"></span><span>
</span><span id="line-531"></span><span>  </span><span class="hs-comment">-- Since is_fun is False, we are *definitely* looking at a data value</span><span>
</span><span id="line-532"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003972"><span class="hs-identifier hs-var">updatable</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">GeneralFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#gopt"><span class="hs-identifier hs-var">gopt</span></a></span><span> </span><span class="annot"><span class="annottext">GeneralFlag
</span><a href="GHC.Driver.Flags.html#Opt_Ticky"><span class="hs-identifier hs-var">Opt_Ticky</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003975"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="hs-comment">-- to catch double entry</span><span>
</span><span id="line-533"></span><span>      </span><span class="hs-comment">{- OLD: || opt_SMP
         I decided to remove this, because in SMP mode it doesn't matter
         if we enter the same thunk multiple times, so the optimisation
         of jumping directly to the entry code is still valid.  --SDM
        -}</span><span>
</span><span id="line-538"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CallMethod
</span><a href="GHC.StgToCmm.Closure.html#EnterIt"><span class="hs-identifier hs-var">EnterIt</span></a></span><span>
</span><span id="line-539"></span><span>
</span><span id="line-540"></span><span>  </span><span class="hs-comment">-- even a non-updatable selector thunk can be updated by the garbage</span><span>
</span><span id="line-541"></span><span>  </span><span class="hs-comment">-- collector, so we must enter it. (#8817)</span><span>
</span><span id="line-542"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#SelectorThunk"><span class="hs-identifier hs-type">SelectorThunk</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">StandardFormInfo
</span><a href="#local-6989586621681003971"><span class="hs-identifier hs-var">std_form_info</span></a></span><span>
</span><span id="line-543"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CallMethod
</span><a href="GHC.StgToCmm.Closure.html#EnterIt"><span class="hs-identifier hs-var">EnterIt</span></a></span><span>
</span><span id="line-544"></span><span>
</span><span id="line-545"></span><span>    </span><span class="hs-comment">-- We used to have ASSERT( n_args == 0 ), but actually it is</span><span>
</span><span id="line-546"></span><span>    </span><span class="hs-comment">-- possible for the optimiser to generate</span><span>
</span><span id="line-547"></span><span>    </span><span class="hs-comment">--   let bot :: Int = error Int &quot;urk&quot;</span><span>
</span><span id="line-548"></span><span>    </span><span class="hs-comment">--   in (bot `cast` unsafeCoerce Int (Int -&gt; Int)) 3</span><span>
</span><span id="line-549"></span><span>    </span><span class="hs-comment">-- This happens as a result of the case-of-error transformation</span><span>
</span><span id="line-550"></span><span>    </span><span class="hs-comment">-- So the right thing to do is just to enter the thing</span><span>
</span><span id="line-551"></span><span>
</span><span id="line-552"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>        </span><span class="hs-comment">-- Jump direct to code for single-entry thunks</span><span>
</span><span id="line-553"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">n_args</span><span> </span><span class="hs-operator">==</span><span> </span><span class="hs-number">0</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-554"></span><span>    </span><span class="annot"><span class="annottext">CLabel -&gt; RepArity -&gt; CallMethod
</span><a href="GHC.StgToCmm.Closure.html#DirectEntry"><span class="hs-identifier hs-var">DirectEntry</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; Name -&gt; CafInfo -&gt; StandardFormInfo -&gt; Bool -&gt; CLabel
</span><a href="GHC.StgToCmm.Closure.html#thunkEntryLabel"><span class="hs-identifier hs-var">thunkEntryLabel</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003975"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681003974"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; CafInfo
</span><a href="GHC.Types.Id.html#idCafInfo"><span class="hs-identifier hs-var">idCafInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681003973"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">StandardFormInfo
</span><a href="#local-6989586621681003971"><span class="hs-identifier hs-var">std_form_info</span></a></span><span>
</span><span id="line-555"></span><span>                </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003972"><span class="hs-identifier hs-var">updatable</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">RepArity
</span><span class="hs-number">0</span></span><span>
</span><span id="line-556"></span><span>
</span><span id="line-557"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#getCallMethod"><span class="hs-identifier hs-var">getCallMethod</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681003963"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681003963"><span class="hs-identifier hs-var">_name</span></a></span></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Types.html#LFUnknown"><span class="hs-identifier hs-type">LFUnknown</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681003962"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003962"><span class="hs-identifier hs-var">_n_arg</span></a></span></span><span> </span><span id="local-6989586621681003961"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003961"><span class="hs-identifier hs-var">_v_args</span></a></span></span><span> </span><span id="local-6989586621681003960"><span class="annot"><span class="annottext">CgLoc
</span><a href="#local-6989586621681003960"><span class="hs-identifier hs-var">_cg_locs</span></a></span></span><span> </span><span id="local-6989586621681003959"><span class="annot"><span class="annottext">Maybe SelfLoopInfo
</span><a href="#local-6989586621681003959"><span class="hs-identifier hs-var">_self_loop_info</span></a></span></span><span>
</span><span id="line-558"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CallMethod
</span><a href="GHC.StgToCmm.Closure.html#SlowCall"><span class="hs-identifier hs-var">SlowCall</span></a></span><span> </span><span class="hs-comment">-- might be a function</span><span>
</span><span id="line-559"></span><span>
</span><span id="line-560"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#getCallMethod"><span class="hs-identifier hs-var">getCallMethod</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681003958"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681003958"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Types.html#LFUnknown"><span class="hs-identifier hs-type">LFUnknown</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681003957"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003957"><span class="hs-identifier hs-var">n_args</span></a></span></span><span> </span><span id="local-6989586621681003956"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003956"><span class="hs-identifier hs-var">_v_args</span></a></span></span><span> </span><span id="local-6989586621681003955"><span class="annot"><span class="annottext">CgLoc
</span><a href="#local-6989586621681003955"><span class="hs-identifier hs-var">_cg_loc</span></a></span></span><span> </span><span id="local-6989586621681003954"><span class="annot"><span class="annottext">Maybe SelfLoopInfo
</span><a href="#local-6989586621681003954"><span class="hs-identifier hs-var">_self_loop_info</span></a></span></span><span>
</span><span id="line-561"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT2</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">n_args</span><span> </span><span class="hs-operator">==</span><span> </span><span class="hs-number">0</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">name</span><span> </span><span class="hs-operator">&lt;+&gt;</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">n_args</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-562"></span><span>    </span><span class="annot"><span class="annottext">CallMethod
</span><a href="GHC.StgToCmm.Closure.html#EnterIt"><span class="hs-identifier hs-var">EnterIt</span></a></span><span> </span><span class="hs-comment">-- Not a function</span><span>
</span><span id="line-563"></span><span>
</span><span id="line-564"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#getCallMethod"><span class="hs-identifier hs-var">getCallMethod</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681003952"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681003952"><span class="hs-identifier hs-var">_name</span></a></span></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="GHC.StgToCmm.Types.html#LFLetNoEscape"><span class="hs-identifier hs-var">LFLetNoEscape</span></a></span><span> </span><span id="local-6989586621681003951"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003951"><span class="hs-identifier hs-var">_n_args</span></a></span></span><span> </span><span id="local-6989586621681003950"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003950"><span class="hs-identifier hs-var">_v_args</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#LneLoc"><span class="hs-identifier hs-type">LneLoc</span></a></span><span> </span><span id="local-6989586621681003949"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681003949"><span class="hs-identifier hs-var">blk_id</span></a></span></span><span> </span><span id="local-6989586621681003948"><span class="annot"><span class="annottext">[LocalReg]
</span><a href="#local-6989586621681003948"><span class="hs-identifier hs-var">lne_regs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-565"></span><span>              </span><span id="local-6989586621681003947"><span class="annot"><span class="annottext">Maybe SelfLoopInfo
</span><a href="#local-6989586621681003947"><span class="hs-identifier hs-var">_self_loop_info</span></a></span></span><span>
</span><span id="line-566"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BlockId -&gt; [LocalReg] -&gt; CallMethod
</span><a href="GHC.StgToCmm.Closure.html#JumpToIt"><span class="hs-identifier hs-var">JumpToIt</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681003949"><span class="hs-identifier hs-var">blk_id</span></a></span><span> </span><span class="annot"><span class="annottext">[LocalReg]
</span><a href="#local-6989586621681003948"><span class="hs-identifier hs-var">lne_regs</span></a></span><span>
</span><span id="line-567"></span><span>
</span><span id="line-568"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#getCallMethod"><span class="hs-identifier hs-var">getCallMethod</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Name
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">RepArity
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">RepArity
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">CgLoc
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Maybe SelfLoopInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; CallMethod
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Unknown call method&quot;</span></span><span>
</span><span id="line-569"></span><span>
</span><span id="line-570"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-571"></span><span class="hs-comment">--              Data types for closure information</span><span>
</span><span id="line-572"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-573"></span><span>
</span><span id="line-574"></span><span>
</span><span id="line-575"></span><span class="hs-comment">{- ClosureInfo: information about a binding

   We make a ClosureInfo for each let binding (both top level and not),
   but not bindings for data constructors: for those we build a CmmInfoTable
   directly (see mkDataConInfoTable).

   To a first approximation:
       ClosureInfo = (LambdaFormInfo, CmmInfoTable)

   A ClosureInfo has enough information
     a) to construct the info table itself, and build other things
        related to the binding (e.g. slow entry points for a function)
     b) to allocate a closure containing that info pointer (i.e.
           it knows the info table label)
-}</span><span>
</span><span id="line-590"></span><span>
</span><span id="line-591"></span><span class="hs-keyword">data</span><span> </span><span id="ClosureInfo"><span class="annot"><a href="GHC.StgToCmm.Closure.html#ClosureInfo"><span class="hs-identifier hs-var">ClosureInfo</span></a></span></span><span>
</span><span id="line-592"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="ClosureInfo"><span class="annot"><a href="GHC.StgToCmm.Closure.html#ClosureInfo"><span class="hs-identifier hs-var">ClosureInfo</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-593"></span><span>        </span><span id="closureName"><span class="annot"><span class="annottext">ClosureInfo -&gt; Name
</span><a href="GHC.StgToCmm.Closure.html#closureName"><span class="hs-identifier hs-var hs-var">closureName</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">,</span><span>           </span><span class="hs-comment">-- The thing bound to this closure</span><span>
</span><span id="line-594"></span><span>           </span><span class="hs-comment">-- we don't really need this field: it's only used in generating</span><span>
</span><span id="line-595"></span><span>           </span><span class="hs-comment">-- code for ticky and profiling, and we could pass the information</span><span>
</span><span id="line-596"></span><span>           </span><span class="hs-comment">-- around separately, but it doesn't do much harm to keep it here.</span><span>
</span><span id="line-597"></span><span>
</span><span id="line-598"></span><span>        </span><span id="closureLFInfo"><span class="annot"><span class="annottext">ClosureInfo -&gt; LambdaFormInfo
</span><a href="GHC.StgToCmm.Closure.html#closureLFInfo"><span class="hs-identifier hs-var hs-var">closureLFInfo</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-comment">-- NOTE: not an LFCon</span><span>
</span><span id="line-599"></span><span>          </span><span class="hs-comment">-- this tells us about what the closure contains: it's right-hand-side.</span><span>
</span><span id="line-600"></span><span>
</span><span id="line-601"></span><span>          </span><span class="hs-comment">-- the rest is just an unpacked CmmInfoTable.</span><span>
</span><span id="line-602"></span><span>        </span><span id="closureInfoLabel"><span class="annot"><span class="annottext">ClosureInfo -&gt; CLabel
</span><a href="GHC.StgToCmm.Closure.html#closureInfoLabel"><span class="hs-identifier hs-var hs-var">closureInfoLabel</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-603"></span><span>        </span><span id="closureSMRep"><span class="annot"><span class="annottext">ClosureInfo -&gt; SMRep
</span><a href="GHC.StgToCmm.Closure.html#closureSMRep"><span class="hs-identifier hs-var hs-var">closureSMRep</span></a></span></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SMRep"><span class="hs-identifier hs-type">SMRep</span></a></span><span class="hs-special">,</span><span>          </span><span class="hs-comment">-- representation used by storage mgr</span><span>
</span><span id="line-604"></span><span>        </span><span id="closureProf"><span class="annot"><span class="annottext">ClosureInfo -&gt; ProfilingInfo
</span><a href="GHC.StgToCmm.Closure.html#closureProf"><span class="hs-identifier hs-var hs-var">closureProf</span></a></span></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Cmm.html#ProfilingInfo"><span class="hs-identifier hs-type">ProfilingInfo</span></a></span><span>
</span><span id="line-605"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-606"></span><span>
</span><span id="line-607"></span><span class="hs-comment">-- | Convert from 'ClosureInfo' to 'CmmInfoTable'.</span><span>
</span><span id="line-608"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#mkCmmInfo"><span class="hs-identifier hs-type">mkCmmInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#ClosureInfo"><span class="hs-identifier hs-type">ClosureInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.CostCentre.html#CostCentreStack"><span class="hs-identifier hs-type">CostCentreStack</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmInfoTable"><span class="hs-identifier hs-type">CmmInfoTable</span></a></span><span>
</span><span id="line-609"></span><span id="mkCmmInfo"><span class="annot"><span class="annottext">mkCmmInfo :: ClosureInfo -&gt; Id -&gt; CostCentreStack -&gt; CmmInfoTable
</span><a href="GHC.StgToCmm.Closure.html#mkCmmInfo"><span class="hs-identifier hs-var hs-var">mkCmmInfo</span></a></span></span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#ClosureInfo"><span class="hs-identifier hs-type">ClosureInfo</span></a></span><span> </span><span class="hs-special">{</span><span id="local-6989586621681003939"><span id="local-6989586621681003940"><span id="local-6989586621681003941"><span id="local-6989586621681003942"><span id="local-6989586621681003943"><span class="annot"><span class="annottext">Name
LambdaFormInfo
SMRep
CLabel
ProfilingInfo
closureProf :: ProfilingInfo
closureSMRep :: SMRep
closureInfoLabel :: CLabel
closureLFInfo :: LambdaFormInfo
closureName :: Name
closureProf :: ClosureInfo -&gt; ProfilingInfo
closureSMRep :: ClosureInfo -&gt; SMRep
closureInfoLabel :: ClosureInfo -&gt; CLabel
closureName :: ClosureInfo -&gt; Name
closureLFInfo :: ClosureInfo -&gt; LambdaFormInfo
</span><a href="#local-6989586621681003939"><span class="hs-glyph hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">..</span></a></span></span></span></span></span></span><span class="hs-special">}</span><span> </span><span id="local-6989586621681003938"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681003938"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621681003937"><span class="annot"><span class="annottext">CostCentreStack
</span><a href="#local-6989586621681003937"><span class="hs-identifier hs-var">ccs</span></a></span></span><span>
</span><span id="line-610"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmInfoTable :: CLabel
-&gt; SMRep
-&gt; ProfilingInfo
-&gt; Maybe CLabel
-&gt; Maybe (Id, CostCentreStack)
-&gt; CmmInfoTable
</span><a href="GHC.Cmm.html#CmmInfoTable"><span class="hs-identifier hs-type">CmmInfoTable</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cit_lbl :: CLabel
</span><a href="GHC.Cmm.html#cit_lbl"><span class="hs-identifier hs-var">cit_lbl</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681003941"><span class="hs-identifier hs-var">closureInfoLabel</span></a></span><span>
</span><span id="line-611"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cit_rep :: SMRep
</span><a href="GHC.Cmm.html#cit_rep"><span class="hs-identifier hs-var">cit_rep</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SMRep
</span><a href="#local-6989586621681003940"><span class="hs-identifier hs-var">closureSMRep</span></a></span><span>
</span><span id="line-612"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cit_prof :: ProfilingInfo
</span><a href="GHC.Cmm.html#cit_prof"><span class="hs-identifier hs-var">cit_prof</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ProfilingInfo
</span><a href="#local-6989586621681003939"><span class="hs-identifier hs-var">closureProf</span></a></span><span>
</span><span id="line-613"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cit_srt :: Maybe CLabel
</span><a href="GHC.Cmm.html#cit_srt"><span class="hs-identifier hs-var">cit_srt</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe CLabel
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-614"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cit_clo :: Maybe (Id, CostCentreStack)
</span><a href="GHC.Cmm.html#cit_clo"><span class="hs-identifier hs-var">cit_clo</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">SMRep -&gt; Bool
</span><a href="GHC.Runtime.Heap.Layout.html#isStaticRep"><span class="hs-identifier hs-var">isStaticRep</span></a></span><span> </span><span class="annot"><span class="annottext">SMRep
</span><a href="#local-6989586621681003940"><span class="hs-identifier hs-var">closureSMRep</span></a></span><span>
</span><span id="line-615"></span><span>                                </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">(Id, CostCentreStack) -&gt; Maybe (Id, CostCentreStack)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681003938"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">CostCentreStack
</span><a href="#local-6989586621681003937"><span class="hs-identifier hs-var">ccs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-616"></span><span>                                </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Maybe (Id, CostCentreStack)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-617"></span><span>
</span><span id="line-618"></span><span class="hs-comment">--------------------------------------</span><span>
</span><span id="line-619"></span><span class="hs-comment">--        Building ClosureInfos</span><span>
</span><span id="line-620"></span><span class="hs-comment">--------------------------------------</span><span>
</span><span id="line-621"></span><span>
</span><span id="line-622"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#mkClosureInfo"><span class="hs-identifier hs-type">mkClosureInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span>
</span><span id="line-623"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>                </span><span class="hs-comment">-- Is static</span><span>
</span><span id="line-624"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-625"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span>
</span><span id="line-626"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>        </span><span class="hs-comment">-- Total and pointer words</span><span>
</span><span id="line-627"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>         </span><span class="hs-comment">-- String descriptor</span><span>
</span><span id="line-628"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#ClosureInfo"><span class="hs-identifier hs-type">ClosureInfo</span></a></span><span>
</span><span id="line-629"></span><span id="mkClosureInfo"><span class="annot"><span class="annottext">mkClosureInfo :: DynFlags
-&gt; Bool
-&gt; Id
-&gt; LambdaFormInfo
-&gt; RepArity
-&gt; RepArity
-&gt; String
-&gt; ClosureInfo
</span><a href="GHC.StgToCmm.Closure.html#mkClosureInfo"><span class="hs-identifier hs-var hs-var">mkClosureInfo</span></a></span></span><span> </span><span id="local-6989586621681003929"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003929"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681003928"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003928"><span class="hs-identifier hs-var">is_static</span></a></span></span><span> </span><span id="local-6989586621681003927"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681003927"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621681003926"><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681003926"><span class="hs-identifier hs-var">lf_info</span></a></span></span><span> </span><span id="local-6989586621681003925"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003925"><span class="hs-identifier hs-var">tot_wds</span></a></span></span><span> </span><span id="local-6989586621681003924"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003924"><span class="hs-identifier hs-var">ptr_wds</span></a></span></span><span> </span><span id="local-6989586621681003923"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681003923"><span class="hs-identifier hs-var">val_descr</span></a></span></span><span>
</span><span id="line-630"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ClosureInfo :: Name
-&gt; LambdaFormInfo
-&gt; CLabel
-&gt; SMRep
-&gt; ProfilingInfo
-&gt; ClosureInfo
</span><a href="GHC.StgToCmm.Closure.html#ClosureInfo"><span class="hs-identifier hs-type">ClosureInfo</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">closureName :: Name
</span><a href="GHC.StgToCmm.Closure.html#closureName"><span class="hs-identifier hs-var">closureName</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681003922"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-631"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">closureLFInfo :: LambdaFormInfo
</span><a href="GHC.StgToCmm.Closure.html#closureLFInfo"><span class="hs-identifier hs-var">closureLFInfo</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681003926"><span class="hs-identifier hs-var">lf_info</span></a></span><span>
</span><span id="line-632"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">closureInfoLabel :: CLabel
</span><a href="GHC.StgToCmm.Closure.html#closureInfoLabel"><span class="hs-identifier hs-var">closureInfoLabel</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681003921"><span class="hs-identifier hs-var">info_lbl</span></a></span><span>   </span><span class="hs-comment">-- These three fields are</span><span>
</span><span id="line-633"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">closureSMRep :: SMRep
</span><a href="GHC.StgToCmm.Closure.html#closureSMRep"><span class="hs-identifier hs-var">closureSMRep</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SMRep
</span><a href="#local-6989586621681003920"><span class="hs-identifier hs-var">sm_rep</span></a></span><span>     </span><span class="hs-comment">-- (almost) an info table</span><span>
</span><span id="line-634"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">closureProf :: ProfilingInfo
</span><a href="GHC.StgToCmm.Closure.html#closureProf"><span class="hs-identifier hs-var">closureProf</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ProfilingInfo
</span><a href="#local-6989586621681003919"><span class="hs-identifier hs-var">prof</span></a></span><span> </span><span class="hs-special">}</span><span>     </span><span class="hs-comment">-- (we don't have an SRT yet)</span><span>
</span><span id="line-635"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-636"></span><span>    </span><span id="local-6989586621681003922"><span class="annot"><span class="annottext">name :: Name
</span><a href="#local-6989586621681003922"><span class="hs-identifier hs-var hs-var">name</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Name
</span><a href="GHC.Types.Id.html#idName"><span class="hs-identifier hs-var">idName</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681003927"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-637"></span><span>    </span><span id="local-6989586621681003920"><span class="annot"><span class="annottext">sm_rep :: SMRep
</span><a href="#local-6989586621681003920"><span class="hs-identifier hs-var hs-var">sm_rep</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags
-&gt; Bool -&gt; RepArity -&gt; RepArity -&gt; ClosureTypeInfo -&gt; SMRep
</span><a href="GHC.Runtime.Heap.Layout.html#mkHeapRep"><span class="hs-identifier hs-var">mkHeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003929"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003928"><span class="hs-identifier hs-var">is_static</span></a></span><span> </span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003924"><span class="hs-identifier hs-var">ptr_wds</span></a></span><span> </span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003916"><span class="hs-identifier hs-var">nonptr_wds</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LambdaFormInfo -&gt; ClosureTypeInfo
</span><a href="GHC.StgToCmm.Closure.html#lfClosureType"><span class="hs-identifier hs-var">lfClosureType</span></a></span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681003926"><span class="hs-identifier hs-var">lf_info</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-638"></span><span>    </span><span id="local-6989586621681003919"><span class="annot"><span class="annottext">prof :: ProfilingInfo
</span><a href="#local-6989586621681003919"><span class="hs-identifier hs-var hs-var">prof</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Id -&gt; String -&gt; ProfilingInfo
</span><a href="GHC.StgToCmm.Closure.html#mkProfilingInfo"><span class="hs-identifier hs-var">mkProfilingInfo</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003929"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681003927"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681003923"><span class="hs-identifier hs-var">val_descr</span></a></span><span>
</span><span id="line-639"></span><span>    </span><span id="local-6989586621681003916"><span class="annot"><span class="annottext">nonptr_wds :: RepArity
</span><a href="#local-6989586621681003916"><span class="hs-identifier hs-var hs-var">nonptr_wds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003925"><span class="hs-identifier hs-var">tot_wds</span></a></span><span> </span><span class="annot"><span class="annottext">RepArity -&gt; RepArity -&gt; RepArity
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003924"><span class="hs-identifier hs-var">ptr_wds</span></a></span><span>
</span><span id="line-640"></span><span>
</span><span id="line-641"></span><span>    </span><span id="local-6989586621681003921"><span class="annot"><span class="annottext">info_lbl :: CLabel
</span><a href="#local-6989586621681003921"><span class="hs-identifier hs-var hs-var">info_lbl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Id -&gt; LambdaFormInfo -&gt; CLabel
</span><a href="GHC.StgToCmm.Closure.html#mkClosureInfoTableLabel"><span class="hs-identifier hs-var">mkClosureInfoTableLabel</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003929"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681003927"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681003926"><span class="hs-identifier hs-var">lf_info</span></a></span><span>
</span><span id="line-642"></span><span>
</span><span id="line-643"></span><span class="hs-comment">--------------------------------------</span><span>
</span><span id="line-644"></span><span class="hs-comment">--   Other functions over ClosureInfo</span><span>
</span><span id="line-645"></span><span class="hs-comment">--------------------------------------</span><span>
</span><span id="line-646"></span><span>
</span><span id="line-647"></span><span class="hs-comment">-- Eager blackholing is normally disabled, but can be turned on with</span><span>
</span><span id="line-648"></span><span class="hs-comment">-- -feager-blackholing.  When it is on, we replace the info pointer of</span><span>
</span><span id="line-649"></span><span class="hs-comment">-- the thunk with stg_EAGER_BLACKHOLE_info on entry.</span><span>
</span><span id="line-650"></span><span>
</span><span id="line-651"></span><span class="hs-comment">-- If we wanted to do eager blackholing with slop filling,</span><span>
</span><span id="line-652"></span><span class="hs-comment">-- we'd need to do it at the *end* of a basic block, otherwise</span><span>
</span><span id="line-653"></span><span class="hs-comment">-- we overwrite the free variables in the thunk that we still</span><span>
</span><span id="line-654"></span><span class="hs-comment">-- need.  We have a patch for this from Andy Cheadle, but not</span><span>
</span><span id="line-655"></span><span class="hs-comment">-- incorporated yet. --SDM [6/2004]</span><span>
</span><span id="line-656"></span><span class="hs-comment">--</span><span>
</span><span id="line-657"></span><span class="hs-comment">-- Previously, eager blackholing was enabled when ticky-ticky</span><span>
</span><span id="line-658"></span><span class="hs-comment">-- was on. But it didn't work, and it wasn't strictly necessary</span><span>
</span><span id="line-659"></span><span class="hs-comment">-- to bring back minimal ticky-ticky, so now EAGER_BLACKHOLING</span><span>
</span><span id="line-660"></span><span class="hs-comment">-- is unconditionally disabled. -- krc 1/2007</span><span>
</span><span id="line-661"></span><span class="hs-comment">--</span><span>
</span><span id="line-662"></span><span class="hs-comment">-- Static closures are never themselves black-holed.</span><span>
</span><span id="line-663"></span><span>
</span><span id="line-664"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#blackHoleOnEntry"><span class="hs-identifier hs-type">blackHoleOnEntry</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#ClosureInfo"><span class="hs-identifier hs-type">ClosureInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-665"></span><span id="blackHoleOnEntry"><span class="annot"><span class="annottext">blackHoleOnEntry :: ClosureInfo -&gt; Bool
</span><a href="GHC.StgToCmm.Closure.html#blackHoleOnEntry"><span class="hs-identifier hs-var hs-var">blackHoleOnEntry</span></a></span></span><span> </span><span id="local-6989586621681003912"><span class="annot"><span class="annottext">ClosureInfo
</span><a href="#local-6989586621681003912"><span class="hs-identifier hs-var">cl_info</span></a></span></span><span>
</span><span id="line-666"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">SMRep -&gt; Bool
</span><a href="GHC.Runtime.Heap.Layout.html#isStaticRep"><span class="hs-identifier hs-var">isStaticRep</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ClosureInfo -&gt; SMRep
</span><a href="GHC.StgToCmm.Closure.html#closureSMRep"><span class="hs-identifier hs-var hs-var">closureSMRep</span></a></span><span> </span><span class="annot"><span class="annottext">ClosureInfo
</span><a href="#local-6989586621681003912"><span class="hs-identifier hs-var">cl_info</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-667"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>        </span><span class="hs-comment">-- Never black-hole a static closure</span><span>
</span><span id="line-668"></span><span>
</span><span id="line-669"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-670"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ClosureInfo -&gt; LambdaFormInfo
</span><a href="GHC.StgToCmm.Closure.html#closureLFInfo"><span class="hs-identifier hs-var hs-var">closureLFInfo</span></a></span><span> </span><span class="annot"><span class="annottext">ClosureInfo
</span><a href="#local-6989586621681003912"><span class="hs-identifier hs-var">cl_info</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-671"></span><span>      </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LFReEntrant"><span class="hs-identifier hs-type">LFReEntrant</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-672"></span><span>      </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="GHC.StgToCmm.Types.html#LFLetNoEscape"><span class="hs-identifier hs-var">LFLetNoEscape</span></a></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-673"></span><span>      </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LFThunk"><span class="hs-identifier hs-type">LFThunk</span></a></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681003911"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003911"><span class="hs-identifier hs-var">_no_fvs</span></a></span></span><span> </span><span id="local-6989586621681003910"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003910"><span class="hs-identifier hs-var">upd</span></a></span></span><span> </span><span class="annot"><span class="annottext">StandardFormInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003910"><span class="hs-identifier hs-var">upd</span></a></span><span>   </span><span class="hs-comment">-- See Note [Black-holing non-updatable thunks]</span><span>
</span><span id="line-674"></span><span>      </span><span id="local-6989586621681003909"><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681003909"><span class="hs-identifier hs-var">_other</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;blackHoleOnEntry&quot;</span></span><span>
</span><span id="line-675"></span><span>
</span><span id="line-676"></span><span class="hs-comment">{- Note [Black-holing non-updatable thunks]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We must not black-hole non-updatable (single-entry) thunks otherwise
we run into issues like #10414. Specifically:

  * There is no reason to black-hole a non-updatable thunk: it should
    not be competed for by multiple threads

  * It could, conceivably, cause a space leak if we don't black-hole
    it, if there was a live but never-followed pointer pointing to it.
    Let's hope that doesn't happen.

  * It is dangerous to black-hole a non-updatable thunk because
     - is not updated (of course)
     - hence, if it is black-holed and another thread tries to evaluate
       it, that thread will block forever
    This actually happened in #10414.  So we do not black-hole
    non-updatable thunks.

  * How could two threads evaluate the same non-updatable (single-entry)
    thunk?  See Reid Barton's example below.

  * Only eager blackholing could possibly black-hole a non-updatable
    thunk, because lazy black-holing only affects thunks with an
    update frame on the stack.

Here is and example due to Reid Barton (#10414):
    x = \u []  concat [[1], []]
with the following definitions,

    concat x = case x of
        []       -&gt; []
        (:) x xs -&gt; (++) x (concat xs)

    (++) xs ys = case xs of
        []         -&gt; ys
        (:) x rest -&gt; (:) x ((++) rest ys)

Where we use the syntax @\u []@ to denote an updatable thunk and @\s []@ to
denote a single-entry (i.e. non-updatable) thunk. After a thread evaluates @x@
to WHNF and calls @(++)@ the heap will contain the following thunks,

    x = 1 : y
    y = \u []  (++) [] z
    z = \s []  concat []

Now that the stage is set, consider the follow evaluations by two racing threads
A and B,

  1. Both threads enter @y@ before either is able to replace it with an
     indirection

  2. Thread A does the case analysis in @(++)@ and consequently enters @z@,
     replacing it with a black-hole

  3. At some later point thread B does the same case analysis and also attempts
     to enter @z@. However, it finds that it has been replaced with a black-hole
     so it blocks.

  4. Thread A eventually finishes evaluating @z@ (to @[]@) and updates @y@
     accordingly. It does *not* update @z@, however, as it is single-entry. This
     leaves Thread B blocked forever on a black-hole which will never be
     updated.

To avoid this sort of condition we never black-hole non-updatable thunks.
-}</span><span>
</span><span id="line-742"></span><span>
</span><span id="line-743"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#isStaticClosure"><span class="hs-identifier hs-type">isStaticClosure</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#ClosureInfo"><span class="hs-identifier hs-type">ClosureInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-744"></span><span id="isStaticClosure"><span class="annot"><span class="annottext">isStaticClosure :: ClosureInfo -&gt; Bool
</span><a href="GHC.StgToCmm.Closure.html#isStaticClosure"><span class="hs-identifier hs-var hs-var">isStaticClosure</span></a></span></span><span> </span><span id="local-6989586621681003908"><span class="annot"><span class="annottext">ClosureInfo
</span><a href="#local-6989586621681003908"><span class="hs-identifier hs-var">cl_info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SMRep -&gt; Bool
</span><a href="GHC.Runtime.Heap.Layout.html#isStaticRep"><span class="hs-identifier hs-var">isStaticRep</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ClosureInfo -&gt; SMRep
</span><a href="GHC.StgToCmm.Closure.html#closureSMRep"><span class="hs-identifier hs-var hs-var">closureSMRep</span></a></span><span> </span><span class="annot"><span class="annottext">ClosureInfo
</span><a href="#local-6989586621681003908"><span class="hs-identifier hs-var">cl_info</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-745"></span><span>
</span><span id="line-746"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#closureUpdReqd"><span class="hs-identifier hs-type">closureUpdReqd</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#ClosureInfo"><span class="hs-identifier hs-type">ClosureInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-747"></span><span id="closureUpdReqd"><span class="annot"><span class="annottext">closureUpdReqd :: ClosureInfo -&gt; Bool
</span><a href="GHC.StgToCmm.Closure.html#closureUpdReqd"><span class="hs-identifier hs-var hs-var">closureUpdReqd</span></a></span></span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#ClosureInfo"><span class="hs-identifier hs-type">ClosureInfo</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">closureLFInfo :: ClosureInfo -&gt; LambdaFormInfo
</span><a href="GHC.StgToCmm.Closure.html#closureLFInfo"><span class="hs-identifier hs-var">closureLFInfo</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681003907"><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681003907"><span class="hs-identifier hs-var">lf_info</span></a></span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo -&gt; Bool
</span><a href="GHC.StgToCmm.Closure.html#lfUpdatable"><span class="hs-identifier hs-var">lfUpdatable</span></a></span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681003907"><span class="hs-identifier hs-var">lf_info</span></a></span><span>
</span><span id="line-748"></span><span>
</span><span id="line-749"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#lfUpdatable"><span class="hs-identifier hs-type">lfUpdatable</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-750"></span><span id="lfUpdatable"><span class="annot"><span class="annottext">lfUpdatable :: LambdaFormInfo -&gt; Bool
</span><a href="GHC.StgToCmm.Closure.html#lfUpdatable"><span class="hs-identifier hs-var hs-var">lfUpdatable</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Types.html#LFThunk"><span class="hs-identifier hs-type">LFThunk</span></a></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681003906"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003906"><span class="hs-identifier hs-var">upd</span></a></span></span><span> </span><span class="annot"><span class="annottext">StandardFormInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003906"><span class="hs-identifier hs-var">upd</span></a></span><span>
</span><span id="line-751"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#lfUpdatable"><span class="hs-identifier hs-var">lfUpdatable</span></a></span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-752"></span><span>
</span><span id="line-753"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#closureReEntrant"><span class="hs-identifier hs-type">closureReEntrant</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#ClosureInfo"><span class="hs-identifier hs-type">ClosureInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-754"></span><span id="closureReEntrant"><span class="annot"><span class="annottext">closureReEntrant :: ClosureInfo -&gt; Bool
</span><a href="GHC.StgToCmm.Closure.html#closureReEntrant"><span class="hs-identifier hs-var hs-var">closureReEntrant</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#ClosureInfo"><span class="hs-identifier hs-type">ClosureInfo</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">closureLFInfo :: ClosureInfo -&gt; LambdaFormInfo
</span><a href="GHC.StgToCmm.Closure.html#closureLFInfo"><span class="hs-identifier hs-var">closureLFInfo</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LFReEntrant"><span class="hs-identifier hs-type">LFReEntrant</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-755"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#closureReEntrant"><span class="hs-identifier hs-var">closureReEntrant</span></a></span><span> </span><span class="annot"><span class="annottext">ClosureInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-756"></span><span>
</span><span id="line-757"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#closureFunInfo"><span class="hs-identifier hs-type">closureFunInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#ClosureInfo"><span class="hs-identifier hs-type">ClosureInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Basic.html#RepArity"><span class="hs-identifier hs-type">RepArity</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#ArgDescr"><span class="hs-identifier hs-type">ArgDescr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-758"></span><span id="closureFunInfo"><span class="annot"><span class="annottext">closureFunInfo :: ClosureInfo -&gt; Maybe (RepArity, ArgDescr)
</span><a href="GHC.StgToCmm.Closure.html#closureFunInfo"><span class="hs-identifier hs-var hs-var">closureFunInfo</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#ClosureInfo"><span class="hs-identifier hs-type">ClosureInfo</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">closureLFInfo :: ClosureInfo -&gt; LambdaFormInfo
</span><a href="GHC.StgToCmm.Closure.html#closureLFInfo"><span class="hs-identifier hs-var">closureLFInfo</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681003905"><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681003905"><span class="hs-identifier hs-var">lf_info</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo -&gt; Maybe (RepArity, ArgDescr)
</span><a href="GHC.StgToCmm.Closure.html#lfFunInfo"><span class="hs-identifier hs-var">lfFunInfo</span></a></span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681003905"><span class="hs-identifier hs-var">lf_info</span></a></span><span>
</span><span id="line-759"></span><span>
</span><span id="line-760"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#lfFunInfo"><span class="hs-identifier hs-type">lfFunInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>  </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Basic.html#RepArity"><span class="hs-identifier hs-type">RepArity</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#ArgDescr"><span class="hs-identifier hs-type">ArgDescr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-761"></span><span id="lfFunInfo"><span class="annot"><span class="annottext">lfFunInfo :: LambdaFormInfo -&gt; Maybe (RepArity, ArgDescr)
</span><a href="GHC.StgToCmm.Closure.html#lfFunInfo"><span class="hs-identifier hs-var hs-var">lfFunInfo</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Types.html#LFReEntrant"><span class="hs-identifier hs-type">LFReEntrant</span></a></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681003903"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003903"><span class="hs-identifier hs-var">arity</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681003902"><span class="annot"><span class="annottext">ArgDescr
</span><a href="#local-6989586621681003902"><span class="hs-identifier hs-var">arg_desc</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(RepArity, ArgDescr) -&gt; Maybe (RepArity, ArgDescr)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003903"><span class="hs-identifier hs-var">arity</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ArgDescr
</span><a href="#local-6989586621681003902"><span class="hs-identifier hs-var">arg_desc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-762"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#lfFunInfo"><span class="hs-identifier hs-var">lfFunInfo</span></a></span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><span class="hs-identifier">_</span></span><span>                                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (RepArity, ArgDescr)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-763"></span><span>
</span><span id="line-764"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#funTag"><span class="hs-identifier hs-type">funTag</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#ClosureInfo"><span class="hs-identifier hs-type">ClosureInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#DynTag"><span class="hs-identifier hs-type">DynTag</span></a></span><span>
</span><span id="line-765"></span><span id="funTag"><span class="annot"><span class="annottext">funTag :: DynFlags -&gt; ClosureInfo -&gt; RepArity
</span><a href="GHC.StgToCmm.Closure.html#funTag"><span class="hs-identifier hs-var hs-var">funTag</span></a></span></span><span> </span><span id="local-6989586621681003901"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003901"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#ClosureInfo"><span class="hs-identifier hs-type">ClosureInfo</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">closureLFInfo :: ClosureInfo -&gt; LambdaFormInfo
</span><a href="GHC.StgToCmm.Closure.html#closureLFInfo"><span class="hs-identifier hs-var">closureLFInfo</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681003900"><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681003900"><span class="hs-identifier hs-var">lf_info</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-766"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; LambdaFormInfo -&gt; RepArity
</span><a href="GHC.StgToCmm.Closure.html#lfDynTag"><span class="hs-identifier hs-var">lfDynTag</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003901"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681003900"><span class="hs-identifier hs-var">lf_info</span></a></span><span>
</span><span id="line-767"></span><span>
</span><span id="line-768"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#isToplevClosure"><span class="hs-identifier hs-type">isToplevClosure</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#ClosureInfo"><span class="hs-identifier hs-type">ClosureInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-769"></span><span id="isToplevClosure"><span class="annot"><span class="annottext">isToplevClosure :: ClosureInfo -&gt; Bool
</span><a href="GHC.StgToCmm.Closure.html#isToplevClosure"><span class="hs-identifier hs-var hs-var">isToplevClosure</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#ClosureInfo"><span class="hs-identifier hs-type">ClosureInfo</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">closureLFInfo :: ClosureInfo -&gt; LambdaFormInfo
</span><a href="GHC.StgToCmm.Closure.html#closureLFInfo"><span class="hs-identifier hs-var">closureLFInfo</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681003899"><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681003899"><span class="hs-identifier hs-var">lf_info</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-770"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681003899"><span class="hs-identifier hs-var">lf_info</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-771"></span><span>      </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LFReEntrant"><span class="hs-identifier hs-type">LFReEntrant</span></a></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><a href="GHC.Types.Basic.html#TopLevel"><span class="hs-identifier hs-var">TopLevel</span></a></span><span> </span><span class="annot"><span class="annottext">RepArity
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ArgDescr
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-772"></span><span>      </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LFThunk"><span class="hs-identifier hs-type">LFThunk</span></a></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><a href="GHC.Types.Basic.html#TopLevel"><span class="hs-identifier hs-var">TopLevel</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">StandardFormInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-773"></span><span>      </span><span id="local-6989586621681003898"><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681003898"><span class="hs-identifier hs-var">_other</span></a></span></span><span>                     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-774"></span><span>
</span><span id="line-775"></span><span class="hs-comment">--------------------------------------</span><span>
</span><span id="line-776"></span><span class="hs-comment">--   Label generation</span><span>
</span><span id="line-777"></span><span class="hs-comment">--------------------------------------</span><span>
</span><span id="line-778"></span><span>
</span><span id="line-779"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#staticClosureLabel"><span class="hs-identifier hs-type">staticClosureLabel</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#ClosureInfo"><span class="hs-identifier hs-type">ClosureInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span>
</span><span id="line-780"></span><span id="staticClosureLabel"><span class="annot"><span class="annottext">staticClosureLabel :: ClosureInfo -&gt; CLabel
</span><a href="GHC.StgToCmm.Closure.html#staticClosureLabel"><span class="hs-identifier hs-var hs-var">staticClosureLabel</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#toClosureLbl"><span class="hs-identifier hs-var">toClosureLbl</span></a></span><span> </span><span class="annot"><span class="annottext">(CLabel -&gt; CLabel)
-&gt; (ClosureInfo -&gt; CLabel) -&gt; ClosureInfo -&gt; CLabel
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span>  </span><span class="annot"><span class="annottext">ClosureInfo -&gt; CLabel
</span><a href="GHC.StgToCmm.Closure.html#closureInfoLabel"><span class="hs-identifier hs-var hs-var">closureInfoLabel</span></a></span><span>
</span><span id="line-781"></span><span>
</span><span id="line-782"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#closureSlowEntryLabel"><span class="hs-identifier hs-type">closureSlowEntryLabel</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#ClosureInfo"><span class="hs-identifier hs-type">ClosureInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span>
</span><span id="line-783"></span><span id="closureSlowEntryLabel"><span class="annot"><span class="annottext">closureSlowEntryLabel :: ClosureInfo -&gt; CLabel
</span><a href="GHC.StgToCmm.Closure.html#closureSlowEntryLabel"><span class="hs-identifier hs-var hs-var">closureSlowEntryLabel</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#toSlowEntryLbl"><span class="hs-identifier hs-var">toSlowEntryLbl</span></a></span><span> </span><span class="annot"><span class="annottext">(CLabel -&gt; CLabel)
-&gt; (ClosureInfo -&gt; CLabel) -&gt; ClosureInfo -&gt; CLabel
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ClosureInfo -&gt; CLabel
</span><a href="GHC.StgToCmm.Closure.html#closureInfoLabel"><span class="hs-identifier hs-var hs-var">closureInfoLabel</span></a></span><span>
</span><span id="line-784"></span><span>
</span><span id="line-785"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#closureLocalEntryLabel"><span class="hs-identifier hs-type">closureLocalEntryLabel</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#ClosureInfo"><span class="hs-identifier hs-type">ClosureInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span>
</span><span id="line-786"></span><span id="closureLocalEntryLabel"><span class="annot"><span class="annottext">closureLocalEntryLabel :: Platform -&gt; ClosureInfo -&gt; CLabel
</span><a href="GHC.StgToCmm.Closure.html#closureLocalEntryLabel"><span class="hs-identifier hs-var hs-var">closureLocalEntryLabel</span></a></span></span><span> </span><span id="local-6989586621681003895"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681003895"><span class="hs-identifier hs-var">platform</span></a></span></span><span>
</span><span id="line-787"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Bool
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformTablesNextToCode"><span class="hs-identifier hs-var hs-var">platformTablesNextToCode</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681003895"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#toInfoLbl"><span class="hs-identifier hs-var">toInfoLbl</span></a></span><span>  </span><span class="annot"><span class="annottext">(CLabel -&gt; CLabel)
-&gt; (ClosureInfo -&gt; CLabel) -&gt; ClosureInfo -&gt; CLabel
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ClosureInfo -&gt; CLabel
</span><a href="GHC.StgToCmm.Closure.html#closureInfoLabel"><span class="hs-identifier hs-var hs-var">closureInfoLabel</span></a></span><span>
</span><span id="line-788"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#toEntryLbl"><span class="hs-identifier hs-var">toEntryLbl</span></a></span><span> </span><span class="annot"><span class="annottext">(CLabel -&gt; CLabel)
-&gt; (ClosureInfo -&gt; CLabel) -&gt; ClosureInfo -&gt; CLabel
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ClosureInfo -&gt; CLabel
</span><a href="GHC.StgToCmm.Closure.html#closureInfoLabel"><span class="hs-identifier hs-var hs-var">closureInfoLabel</span></a></span><span>
</span><span id="line-789"></span><span>
</span><span id="line-790"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#mkClosureInfoTableLabel"><span class="hs-identifier hs-type">mkClosureInfoTableLabel</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span>
</span><span id="line-791"></span><span id="mkClosureInfoTableLabel"><span class="annot"><span class="annottext">mkClosureInfoTableLabel :: DynFlags -&gt; Id -&gt; LambdaFormInfo -&gt; CLabel
</span><a href="GHC.StgToCmm.Closure.html#mkClosureInfoTableLabel"><span class="hs-identifier hs-var hs-var">mkClosureInfoTableLabel</span></a></span></span><span> </span><span id="local-6989586621681003891"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003891"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681003890"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681003890"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621681003889"><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681003889"><span class="hs-identifier hs-var">lf_info</span></a></span></span><span>
</span><span id="line-792"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681003889"><span class="hs-identifier hs-var">lf_info</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-793"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LFThunk"><span class="hs-identifier hs-type">LFThunk</span></a></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681003888"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003888"><span class="hs-identifier hs-var">upd_flag</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Types.html#SelectorThunk"><span class="hs-identifier hs-type">SelectorThunk</span></a></span><span> </span><span id="local-6989586621681003887"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003887"><span class="hs-identifier hs-var">offset</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span>
</span><span id="line-794"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Bool -&gt; RepArity -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkSelectorInfoLabel"><span class="hs-identifier hs-var">mkSelectorInfoLabel</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003891"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003888"><span class="hs-identifier hs-var">upd_flag</span></a></span><span> </span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003887"><span class="hs-identifier hs-var">offset</span></a></span><span>
</span><span id="line-795"></span><span>
</span><span id="line-796"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LFThunk"><span class="hs-identifier hs-type">LFThunk</span></a></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681003885"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003885"><span class="hs-identifier hs-var">upd_flag</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Types.html#ApThunk"><span class="hs-identifier hs-type">ApThunk</span></a></span><span> </span><span id="local-6989586621681003884"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003884"><span class="hs-identifier hs-var">arity</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span>
</span><span id="line-797"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Bool -&gt; RepArity -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkApInfoTableLabel"><span class="hs-identifier hs-var">mkApInfoTableLabel</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003891"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003885"><span class="hs-identifier hs-var">upd_flag</span></a></span><span> </span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003884"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-798"></span><span>
</span><span id="line-799"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LFThunk"><span class="hs-identifier hs-type">LFThunk</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; CafInfo -&gt; CLabel
</span><a href="#local-6989586621681003882"><span class="hs-identifier hs-var">std_mk_lbl</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681003881"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">CafInfo
</span><a href="#local-6989586621681003880"><span class="hs-identifier hs-var">cafs</span></a></span><span>
</span><span id="line-800"></span><span>        </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LFReEntrant"><span class="hs-identifier hs-type">LFReEntrant</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; CafInfo -&gt; CLabel
</span><a href="#local-6989586621681003882"><span class="hs-identifier hs-var">std_mk_lbl</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681003881"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">CafInfo
</span><a href="#local-6989586621681003880"><span class="hs-identifier hs-var">cafs</span></a></span><span>
</span><span id="line-801"></span><span>        </span><span id="local-6989586621681003879"><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681003879"><span class="hs-identifier hs-var">_other</span></a></span></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; CLabel
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;closureInfoTableLabel&quot;</span></span><span>
</span><span id="line-802"></span><span>
</span><span id="line-803"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-804"></span><span>    </span><span id="local-6989586621681003881"><span class="annot"><span class="annottext">name :: Name
</span><a href="#local-6989586621681003881"><span class="hs-identifier hs-var hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Name
</span><a href="GHC.Types.Id.html#idName"><span class="hs-identifier hs-var">idName</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681003890"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-805"></span><span>
</span><span id="line-806"></span><span>    </span><span id="local-6989586621681003882"><span class="annot"><span class="annottext">std_mk_lbl :: Name -&gt; CafInfo -&gt; CLabel
</span><a href="#local-6989586621681003882"><span class="hs-identifier hs-var hs-var">std_mk_lbl</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003878"><span class="hs-identifier hs-var">is_local</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; CafInfo -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkLocalInfoTableLabel"><span class="hs-identifier hs-var">mkLocalInfoTableLabel</span></a></span><span>
</span><span id="line-807"></span><span>               </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; CafInfo -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkInfoTableLabel"><span class="hs-identifier hs-var">mkInfoTableLabel</span></a></span><span>
</span><span id="line-808"></span><span>
</span><span id="line-809"></span><span>    </span><span id="local-6989586621681003880"><span class="annot"><span class="annottext">cafs :: CafInfo
</span><a href="#local-6989586621681003880"><span class="hs-identifier hs-var hs-var">cafs</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; CafInfo
</span><a href="GHC.Types.Id.html#idCafInfo"><span class="hs-identifier hs-var">idCafInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681003890"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-810"></span><span>    </span><span id="local-6989586621681003878"><span class="annot"><span class="annottext">is_local :: Bool
</span><a href="#local-6989586621681003878"><span class="hs-identifier hs-var hs-var">is_local</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Bool
</span><a href="GHC.Types.Id.html#isDataConWorkId"><span class="hs-identifier hs-var">isDataConWorkId</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681003890"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-811"></span><span>       </span><span class="hs-comment">-- Make the _info pointer for the implicit datacon worker</span><span>
</span><span id="line-812"></span><span>       </span><span class="hs-comment">-- binding local. The reason we can do this is that importing</span><span>
</span><span id="line-813"></span><span>       </span><span class="hs-comment">-- code always either uses the _closure or _con_info. By the</span><span>
</span><span id="line-814"></span><span>       </span><span class="hs-comment">-- invariants in &quot;GHC.CoreToStg.Prep&quot; anything else gets eta expanded.</span><span>
</span><span id="line-815"></span><span>
</span><span id="line-816"></span><span>
</span><span id="line-817"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#thunkEntryLabel"><span class="hs-identifier hs-type">thunkEntryLabel</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Id.Info.html#CafInfo"><span class="hs-identifier hs-type">CafInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#StandardFormInfo"><span class="hs-identifier hs-type">StandardFormInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span>
</span><span id="line-818"></span><span class="hs-comment">-- thunkEntryLabel is a local help function, not exported.  It's used from</span><span>
</span><span id="line-819"></span><span class="hs-comment">-- getCallMethod.</span><span>
</span><span id="line-820"></span><span id="thunkEntryLabel"><span class="annot"><span class="annottext">thunkEntryLabel :: DynFlags -&gt; Name -&gt; CafInfo -&gt; StandardFormInfo -&gt; Bool -&gt; CLabel
</span><a href="GHC.StgToCmm.Closure.html#thunkEntryLabel"><span class="hs-identifier hs-var hs-var">thunkEntryLabel</span></a></span></span><span> </span><span id="local-6989586621681003874"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003874"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681003873"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681003873"><span class="hs-identifier hs-var">_thunk_id</span></a></span></span><span> </span><span class="annot"><span class="annottext">CafInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Types.html#ApThunk"><span class="hs-identifier hs-type">ApThunk</span></a></span><span> </span><span id="local-6989586621681003872"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003872"><span class="hs-identifier hs-var">arity</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681003871"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003871"><span class="hs-identifier hs-var">upd_flag</span></a></span></span><span>
</span><span id="line-821"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Bool -&gt; RepArity -&gt; CLabel
</span><a href="GHC.StgToCmm.Closure.html#enterApLabel"><span class="hs-identifier hs-var">enterApLabel</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003874"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003871"><span class="hs-identifier hs-var">upd_flag</span></a></span><span> </span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003872"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-822"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#thunkEntryLabel"><span class="hs-identifier hs-var">thunkEntryLabel</span></a></span><span> </span><span id="local-6989586621681003869"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003869"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681003868"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681003868"><span class="hs-identifier hs-var">_thunk_id</span></a></span></span><span> </span><span class="annot"><span class="annottext">CafInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Types.html#SelectorThunk"><span class="hs-identifier hs-type">SelectorThunk</span></a></span><span> </span><span id="local-6989586621681003867"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003867"><span class="hs-identifier hs-var">offset</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681003866"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003866"><span class="hs-identifier hs-var">upd_flag</span></a></span></span><span>
</span><span id="line-823"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Bool -&gt; RepArity -&gt; CLabel
</span><a href="GHC.StgToCmm.Closure.html#enterSelectorLabel"><span class="hs-identifier hs-var">enterSelectorLabel</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003869"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003866"><span class="hs-identifier hs-var">upd_flag</span></a></span><span> </span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003867"><span class="hs-identifier hs-var">offset</span></a></span><span>
</span><span id="line-824"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#thunkEntryLabel"><span class="hs-identifier hs-var">thunkEntryLabel</span></a></span><span> </span><span id="local-6989586621681003864"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003864"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681003863"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681003863"><span class="hs-identifier hs-var">thunk_id</span></a></span></span><span> </span><span id="local-6989586621681003862"><span class="annot"><span class="annottext">CafInfo
</span><a href="#local-6989586621681003862"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="annot"><span class="annottext">StandardFormInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span>
</span><span id="line-825"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Name -&gt; CafInfo -&gt; CLabel
</span><a href="GHC.StgToCmm.Closure.html#enterIdLabel"><span class="hs-identifier hs-var">enterIdLabel</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; Platform
</span><a href="GHC.Driver.Session.html#targetPlatform"><span class="hs-identifier hs-var hs-var">targetPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003864"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681003863"><span class="hs-identifier hs-var">thunk_id</span></a></span><span> </span><span class="annot"><span class="annottext">CafInfo
</span><a href="#local-6989586621681003862"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-826"></span><span>
</span><span id="line-827"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#enterApLabel"><span class="hs-identifier hs-type">enterApLabel</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Arity"><span class="hs-identifier hs-type">Arity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span>
</span><span id="line-828"></span><span id="enterApLabel"><span class="annot"><span class="annottext">enterApLabel :: DynFlags -&gt; Bool -&gt; RepArity -&gt; CLabel
</span><a href="GHC.StgToCmm.Closure.html#enterApLabel"><span class="hs-identifier hs-var hs-var">enterApLabel</span></a></span></span><span> </span><span id="local-6989586621681003861"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003861"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681003860"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003860"><span class="hs-identifier hs-var">is_updatable</span></a></span></span><span> </span><span id="local-6989586621681003859"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003859"><span class="hs-identifier hs-var">arity</span></a></span></span><span>
</span><span id="line-829"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Bool
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformTablesNextToCode"><span class="hs-identifier hs-var hs-var">platformTablesNextToCode</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681003858"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Bool -&gt; RepArity -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkApInfoTableLabel"><span class="hs-identifier hs-var">mkApInfoTableLabel</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003861"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003860"><span class="hs-identifier hs-var">is_updatable</span></a></span><span> </span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003859"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-830"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Bool -&gt; RepArity -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkApEntryLabel"><span class="hs-identifier hs-var">mkApEntryLabel</span></a></span><span>     </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003861"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003860"><span class="hs-identifier hs-var">is_updatable</span></a></span><span> </span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003859"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-831"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-832"></span><span>   </span><span id="local-6989586621681003858"><span class="annot"><span class="annottext">platform :: Platform
</span><a href="#local-6989586621681003858"><span class="hs-identifier hs-var hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Platform
</span><a href="GHC.Driver.Session.html#targetPlatform"><span class="hs-identifier hs-var hs-var">targetPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003861"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-833"></span><span>
</span><span id="line-834"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#enterSelectorLabel"><span class="hs-identifier hs-type">enterSelectorLabel</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#WordOff"><span class="hs-identifier hs-type">WordOff</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span>
</span><span id="line-835"></span><span id="enterSelectorLabel"><span class="annot"><span class="annottext">enterSelectorLabel :: DynFlags -&gt; Bool -&gt; RepArity -&gt; CLabel
</span><a href="GHC.StgToCmm.Closure.html#enterSelectorLabel"><span class="hs-identifier hs-var hs-var">enterSelectorLabel</span></a></span></span><span> </span><span id="local-6989586621681003855"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003855"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681003854"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003854"><span class="hs-identifier hs-var">upd_flag</span></a></span></span><span> </span><span id="local-6989586621681003853"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003853"><span class="hs-identifier hs-var">offset</span></a></span></span><span>
</span><span id="line-836"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Bool
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformTablesNextToCode"><span class="hs-identifier hs-var hs-var">platformTablesNextToCode</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681003852"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Bool -&gt; RepArity -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkSelectorInfoLabel"><span class="hs-identifier hs-var">mkSelectorInfoLabel</span></a></span><span>  </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003855"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003854"><span class="hs-identifier hs-var">upd_flag</span></a></span><span> </span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003853"><span class="hs-identifier hs-var">offset</span></a></span><span>
</span><span id="line-837"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Bool -&gt; RepArity -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkSelectorEntryLabel"><span class="hs-identifier hs-var">mkSelectorEntryLabel</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003855"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003854"><span class="hs-identifier hs-var">upd_flag</span></a></span><span> </span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003853"><span class="hs-identifier hs-var">offset</span></a></span><span>
</span><span id="line-838"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-839"></span><span>   </span><span id="local-6989586621681003852"><span class="annot"><span class="annottext">platform :: Platform
</span><a href="#local-6989586621681003852"><span class="hs-identifier hs-var hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Platform
</span><a href="GHC.Driver.Session.html#targetPlatform"><span class="hs-identifier hs-var hs-var">targetPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003855"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-840"></span><span>
</span><span id="line-841"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#enterIdLabel"><span class="hs-identifier hs-type">enterIdLabel</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Id.Info.html#CafInfo"><span class="hs-identifier hs-type">CafInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span>
</span><span id="line-842"></span><span id="enterIdLabel"><span class="annot"><span class="annottext">enterIdLabel :: Platform -&gt; Name -&gt; CafInfo -&gt; CLabel
</span><a href="GHC.StgToCmm.Closure.html#enterIdLabel"><span class="hs-identifier hs-var hs-var">enterIdLabel</span></a></span></span><span> </span><span id="local-6989586621681003850"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681003850"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681003849"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681003849"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621681003848"><span class="annot"><span class="annottext">CafInfo
</span><a href="#local-6989586621681003848"><span class="hs-identifier hs-var">c</span></a></span></span><span>
</span><span id="line-843"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Bool
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformTablesNextToCode"><span class="hs-identifier hs-var hs-var">platformTablesNextToCode</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681003850"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; CafInfo -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkInfoTableLabel"><span class="hs-identifier hs-var">mkInfoTableLabel</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681003849"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">CafInfo
</span><a href="#local-6989586621681003848"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-844"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; CafInfo -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkEntryLabel"><span class="hs-identifier hs-var">mkEntryLabel</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681003849"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">CafInfo
</span><a href="#local-6989586621681003848"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-845"></span><span>
</span><span id="line-846"></span><span>
</span><span id="line-847"></span><span class="hs-comment">--------------------------------------</span><span>
</span><span id="line-848"></span><span class="hs-comment">--   Profiling</span><span>
</span><span id="line-849"></span><span class="hs-comment">--------------------------------------</span><span>
</span><span id="line-850"></span><span>
</span><span id="line-851"></span><span class="hs-comment">-- Profiling requires two pieces of information to be determined for</span><span>
</span><span id="line-852"></span><span class="hs-comment">-- each closure's info table --- description and type.</span><span>
</span><span id="line-853"></span><span>
</span><span id="line-854"></span><span class="hs-comment">-- The description is stored directly in the @CClosureInfoTable@ when the</span><span>
</span><span id="line-855"></span><span class="hs-comment">-- info table is built.</span><span>
</span><span id="line-856"></span><span>
</span><span id="line-857"></span><span class="hs-comment">-- The type is determined from the type information stored with the @Id@</span><span>
</span><span id="line-858"></span><span class="hs-comment">-- in the closure info using @closureTypeDescr@.</span><span>
</span><span id="line-859"></span><span>
</span><span id="line-860"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#mkProfilingInfo"><span class="hs-identifier hs-type">mkProfilingInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.html#ProfilingInfo"><span class="hs-identifier hs-type">ProfilingInfo</span></a></span><span>
</span><span id="line-861"></span><span id="mkProfilingInfo"><span class="annot"><span class="annottext">mkProfilingInfo :: DynFlags -&gt; Id -&gt; String -&gt; ProfilingInfo
</span><a href="GHC.StgToCmm.Closure.html#mkProfilingInfo"><span class="hs-identifier hs-var hs-var">mkProfilingInfo</span></a></span></span><span> </span><span id="local-6989586621681003846"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003846"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681003845"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681003845"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621681003844"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681003844"><span class="hs-identifier hs-var">val_descr</span></a></span></span><span>
</span><span id="line-862"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#sccProfilingEnabled"><span class="hs-identifier hs-var">sccProfilingEnabled</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003846"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ProfilingInfo
</span><a href="GHC.Cmm.html#NoProfilingInfo"><span class="hs-identifier hs-var">NoProfilingInfo</span></a></span><span>
</span><span id="line-863"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConstrDescription -&gt; ConstrDescription -&gt; ProfilingInfo
</span><a href="GHC.Cmm.html#ProfilingInfo"><span class="hs-identifier hs-var">ProfilingInfo</span></a></span><span> </span><span class="annot"><span class="annottext">ConstrDescription
</span><a href="#local-6989586621681003841"><span class="hs-identifier hs-var">ty_descr_w8</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; ConstrDescription
</span><a href="../../bytestring/src/Data.ByteString.Char8.html#pack"><span class="hs-identifier hs-var">BS8.pack</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681003844"><span class="hs-identifier hs-var">val_descr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-864"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-865"></span><span>    </span><span id="local-6989586621681003841"><span class="annot"><span class="annottext">ty_descr_w8 :: ConstrDescription
</span><a href="#local-6989586621681003841"><span class="hs-identifier hs-var hs-var">ty_descr_w8</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; ConstrDescription
</span><a href="../../bytestring/src/Data.ByteString.Char8.html#pack"><span class="hs-identifier hs-var">BS8.pack</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; String
</span><a href="GHC.StgToCmm.Closure.html#getTyDescription"><span class="hs-identifier hs-var">getTyDescription</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Type
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var">idType</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681003845"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-866"></span><span>
</span><span id="line-867"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#getTyDescription"><span class="hs-identifier hs-type">getTyDescription</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-868"></span><span id="getTyDescription"><span class="annot"><span class="annottext">getTyDescription :: Type -&gt; String
</span><a href="GHC.StgToCmm.Closure.html#getTyDescription"><span class="hs-identifier hs-var hs-var">getTyDescription</span></a></span></span><span> </span><span id="local-6989586621681003838"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681003838"><span class="hs-identifier hs-var">ty</span></a></span></span><span>
</span><span id="line-869"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; ([Id], ThetaType, Type)
</span><a href="GHC.Tc.Utils.TcType.html#tcSplitSigmaTy"><span class="hs-identifier hs-var">tcSplitSigmaTy</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681003838"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Id]
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ThetaType
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681003836"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681003836"><span class="hs-identifier hs-var">tau_ty</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-870"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681003836"><span class="hs-identifier hs-var">tau_ty</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-871"></span><span>      </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#TyVarTy"><span class="hs-identifier hs-type">TyVarTy</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;*&quot;</span></span><span>
</span><span id="line-872"></span><span>      </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#AppTy"><span class="hs-identifier hs-type">AppTy</span></a></span><span> </span><span id="local-6989586621681003833"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681003833"><span class="hs-identifier hs-var">fun</span></a></span></span><span> </span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Type -&gt; String
</span><a href="GHC.StgToCmm.Closure.html#getTyDescription"><span class="hs-identifier hs-var">getTyDescription</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681003833"><span class="hs-identifier hs-var">fun</span></a></span><span>
</span><span id="line-873"></span><span>      </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#TyConApp"><span class="hs-identifier hs-type">TyConApp</span></a></span><span> </span><span id="local-6989586621681003831"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681003831"><span class="hs-identifier hs-var">tycon</span></a></span></span><span> </span><span class="annot"><span class="annottext">ThetaType
</span><span class="hs-identifier">_</span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; String
forall a. NamedThing a =&gt; a -&gt; String
</span><a href="GHC.Types.Name.html#getOccString"><span class="hs-identifier hs-var">getOccString</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681003831"><span class="hs-identifier hs-var">tycon</span></a></span><span>
</span><span id="line-874"></span><span>      </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#FunTy"><span class="hs-identifier hs-type">FunTy</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">Type -&gt; String
</span><a href="#local-6989586621681003828"><span class="hs-identifier hs-var">fun_result</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681003836"><span class="hs-identifier hs-var">tau_ty</span></a></span><span>
</span><span id="line-875"></span><span>      </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#ForAllTy"><span class="hs-identifier hs-type">ForAllTy</span></a></span><span> </span><span class="annot"><span class="annottext">TyCoVarBinder
</span><span class="hs-identifier">_</span></span><span>  </span><span id="local-6989586621681003826"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681003826"><span class="hs-identifier hs-var">ty</span></a></span></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Type -&gt; String
</span><a href="GHC.StgToCmm.Closure.html#getTyDescription"><span class="hs-identifier hs-var">getTyDescription</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681003826"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-876"></span><span>      </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#LitTy"><span class="hs-identifier hs-type">LitTy</span></a></span><span> </span><span id="local-6989586621681003824"><span class="annot"><span class="annottext">TyLit
</span><a href="#local-6989586621681003824"><span class="hs-identifier hs-var">n</span></a></span></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">TyLit -&gt; String
</span><a href="GHC.StgToCmm.Closure.html#getTyLitDescription"><span class="hs-identifier hs-var">getTyLitDescription</span></a></span><span> </span><span class="annot"><span class="annottext">TyLit
</span><a href="#local-6989586621681003824"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-877"></span><span>      </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#CastTy"><span class="hs-identifier hs-type">CastTy</span></a></span><span> </span><span id="local-6989586621681003821"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681003821"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><span class="hs-identifier">_</span></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Type -&gt; String
</span><a href="GHC.StgToCmm.Closure.html#getTyDescription"><span class="hs-identifier hs-var">getTyDescription</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681003821"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-878"></span><span>      </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#CoercionTy"><span class="hs-identifier hs-type">CoercionTy</span></a></span><span> </span><span id="local-6989586621681003819"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621681003819"><span class="hs-identifier hs-var">co</span></a></span></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; String
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;getTyDescription&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Coercion -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621681003819"><span class="hs-identifier hs-var">co</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-879"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-880"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-881"></span><span>    </span><span id="local-6989586621681003828"><span class="annot"><span class="annottext">fun_result :: Type -&gt; String
</span><a href="#local-6989586621681003828"><span class="hs-identifier hs-var hs-var">fun_result</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#FunTy"><span class="hs-identifier hs-type">FunTy</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ft_res :: Type -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#ft_res"><span class="hs-identifier hs-var">ft_res</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681003817"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681003817"><span class="hs-identifier hs-var">res</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'&gt;'</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">Type -&gt; String
</span><a href="#local-6989586621681003828"><span class="hs-identifier hs-var">fun_result</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681003817"><span class="hs-identifier hs-var">res</span></a></span><span>
</span><span id="line-882"></span><span>    </span><span class="annot"><a href="#local-6989586621681003828"><span class="hs-identifier hs-var">fun_result</span></a></span><span> </span><span id="local-6989586621681003816"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681003816"><span class="hs-identifier hs-var">other</span></a></span></span><span>                    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type -&gt; String
</span><a href="GHC.StgToCmm.Closure.html#getTyDescription"><span class="hs-identifier hs-var">getTyDescription</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681003816"><span class="hs-identifier hs-var">other</span></a></span><span>
</span><span id="line-883"></span><span>
</span><span id="line-884"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#getTyLitDescription"><span class="hs-identifier hs-type">getTyLitDescription</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#TyLit"><span class="hs-identifier hs-type">TyLit</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-885"></span><span id="getTyLitDescription"><span class="annot"><span class="annottext">getTyLitDescription :: TyLit -&gt; String
</span><a href="GHC.StgToCmm.Closure.html#getTyLitDescription"><span class="hs-identifier hs-var hs-var">getTyLitDescription</span></a></span></span><span> </span><span id="local-6989586621681003815"><span class="annot"><span class="annottext">TyLit
</span><a href="#local-6989586621681003815"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-886"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">TyLit
</span><a href="#local-6989586621681003815"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-887"></span><span>    </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#NumTyLit"><span class="hs-identifier hs-type">NumTyLit</span></a></span><span> </span><span id="local-6989586621681003813"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681003813"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681003813"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-888"></span><span>    </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#StrTyLit"><span class="hs-identifier hs-type">StrTyLit</span></a></span><span> </span><span id="local-6989586621681003810"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621681003810"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621681003810"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-889"></span><span>
</span><span id="line-890"></span><span class="hs-comment">--------------------------------------</span><span>
</span><span id="line-891"></span><span class="hs-comment">--   CmmInfoTable-related things</span><span>
</span><span id="line-892"></span><span class="hs-comment">--------------------------------------</span><span>
</span><span id="line-893"></span><span>
</span><span id="line-894"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#mkDataConInfoTable"><span class="hs-identifier hs-type">mkDataConInfoTable</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmInfoTable"><span class="hs-identifier hs-type">CmmInfoTable</span></a></span><span>
</span><span id="line-895"></span><span id="mkDataConInfoTable"><span class="annot"><span class="annottext">mkDataConInfoTable :: DynFlags -&gt; DataCon -&gt; Bool -&gt; RepArity -&gt; RepArity -&gt; CmmInfoTable
</span><a href="GHC.StgToCmm.Closure.html#mkDataConInfoTable"><span class="hs-identifier hs-var hs-var">mkDataConInfoTable</span></a></span></span><span> </span><span id="local-6989586621681003809"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003809"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681003808"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681003808"><span class="hs-identifier hs-var">data_con</span></a></span></span><span> </span><span id="local-6989586621681003807"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003807"><span class="hs-identifier hs-var">is_static</span></a></span></span><span> </span><span id="local-6989586621681003806"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003806"><span class="hs-identifier hs-var">ptr_wds</span></a></span></span><span> </span><span id="local-6989586621681003805"><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003805"><span class="hs-identifier hs-var">nonptr_wds</span></a></span></span><span>
</span><span id="line-896"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmInfoTable :: CLabel
-&gt; SMRep
-&gt; ProfilingInfo
-&gt; Maybe CLabel
-&gt; Maybe (Id, CostCentreStack)
-&gt; CmmInfoTable
</span><a href="GHC.Cmm.html#CmmInfoTable"><span class="hs-identifier hs-type">CmmInfoTable</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cit_lbl :: CLabel
</span><a href="GHC.Cmm.html#cit_lbl"><span class="hs-identifier hs-var">cit_lbl</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681003804"><span class="hs-identifier hs-var">info_lbl</span></a></span><span>
</span><span id="line-897"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cit_rep :: SMRep
</span><a href="GHC.Cmm.html#cit_rep"><span class="hs-identifier hs-var">cit_rep</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SMRep
</span><a href="#local-6989586621681003803"><span class="hs-identifier hs-var">sm_rep</span></a></span><span>
</span><span id="line-898"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cit_prof :: ProfilingInfo
</span><a href="GHC.Cmm.html#cit_prof"><span class="hs-identifier hs-var">cit_prof</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ProfilingInfo
</span><a href="#local-6989586621681003802"><span class="hs-identifier hs-var">prof</span></a></span><span>
</span><span id="line-899"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cit_srt :: Maybe CLabel
</span><a href="GHC.Cmm.html#cit_srt"><span class="hs-identifier hs-var">cit_srt</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe CLabel
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-900"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cit_clo :: Maybe (Id, CostCentreStack)
</span><a href="GHC.Cmm.html#cit_clo"><span class="hs-identifier hs-var">cit_clo</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (Id, CostCentreStack)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-901"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-902"></span><span>   </span><span id="local-6989586621681003801"><span class="annot"><span class="annottext">name :: Name
</span><a href="#local-6989586621681003801"><span class="hs-identifier hs-var hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Name
</span><a href="GHC.Core.DataCon.html#dataConName"><span class="hs-identifier hs-var">dataConName</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681003808"><span class="hs-identifier hs-var">data_con</span></a></span><span>
</span><span id="line-903"></span><span>   </span><span id="local-6989586621681003804"><span class="annot"><span class="annottext">info_lbl :: CLabel
</span><a href="#local-6989586621681003804"><span class="hs-identifier hs-var hs-var">info_lbl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; CafInfo -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkConInfoTableLabel"><span class="hs-identifier hs-var">mkConInfoTableLabel</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681003801"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">CafInfo
</span><a href="GHC.Types.Id.Info.html#NoCafRefs"><span class="hs-identifier hs-var">NoCafRefs</span></a></span><span>
</span><span id="line-904"></span><span>   </span><span id="local-6989586621681003803"><span class="annot"><span class="annottext">sm_rep :: SMRep
</span><a href="#local-6989586621681003803"><span class="hs-identifier hs-var hs-var">sm_rep</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags
-&gt; Bool -&gt; RepArity -&gt; RepArity -&gt; ClosureTypeInfo -&gt; SMRep
</span><a href="GHC.Runtime.Heap.Layout.html#mkHeapRep"><span class="hs-identifier hs-var">mkHeapRep</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003809"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003807"><span class="hs-identifier hs-var">is_static</span></a></span><span> </span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003806"><span class="hs-identifier hs-var">ptr_wds</span></a></span><span> </span><span class="annot"><span class="annottext">RepArity
</span><a href="#local-6989586621681003805"><span class="hs-identifier hs-var">nonptr_wds</span></a></span><span> </span><span class="annot"><span class="annottext">ClosureTypeInfo
</span><a href="#local-6989586621681003797"><span class="hs-identifier hs-var">cl_type</span></a></span><span>
</span><span id="line-905"></span><span>   </span><span id="local-6989586621681003797"><span class="annot"><span class="annottext">cl_type :: ClosureTypeInfo
</span><a href="#local-6989586621681003797"><span class="hs-identifier hs-var hs-var">cl_type</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RepArity -&gt; ConstrDescription -&gt; ClosureTypeInfo
</span><a href="GHC.Runtime.Heap.Layout.html#Constr"><span class="hs-identifier hs-var">Constr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; RepArity
</span><a href="GHC.Core.DataCon.html#dataConTagZ"><span class="hs-identifier hs-var">dataConTagZ</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681003808"><span class="hs-identifier hs-var">data_con</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; ConstrDescription
</span><a href="GHC.Core.DataCon.html#dataConIdentity"><span class="hs-identifier hs-var">dataConIdentity</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681003808"><span class="hs-identifier hs-var">data_con</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-906"></span><span>                  </span><span class="hs-comment">-- We keep the *zero-indexed* tag in the srt_len field</span><span>
</span><span id="line-907"></span><span>                  </span><span class="hs-comment">-- of the info table of a data constructor.</span><span>
</span><span id="line-908"></span><span>
</span><span id="line-909"></span><span>   </span><span id="local-6989586621681003802"><span class="annot"><span class="annottext">prof :: ProfilingInfo
</span><a href="#local-6989586621681003802"><span class="hs-identifier hs-var hs-var">prof</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#sccProfilingEnabled"><span class="hs-identifier hs-var">sccProfilingEnabled</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681003809"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ProfilingInfo
</span><a href="GHC.Cmm.html#NoProfilingInfo"><span class="hs-identifier hs-var">NoProfilingInfo</span></a></span><span>
</span><span id="line-910"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConstrDescription -&gt; ConstrDescription -&gt; ProfilingInfo
</span><a href="GHC.Cmm.html#ProfilingInfo"><span class="hs-identifier hs-var">ProfilingInfo</span></a></span><span> </span><span class="annot"><span class="annottext">ConstrDescription
</span><a href="#local-6989586621681003796"><span class="hs-identifier hs-var">ty_descr</span></a></span><span> </span><span class="annot"><span class="annottext">ConstrDescription
</span><a href="#local-6989586621681003795"><span class="hs-identifier hs-var">val_descr</span></a></span><span>
</span><span id="line-911"></span><span>
</span><span id="line-912"></span><span>   </span><span id="local-6989586621681003796"><span class="annot"><span class="annottext">ty_descr :: ConstrDescription
</span><a href="#local-6989586621681003796"><span class="hs-identifier hs-var hs-var">ty_descr</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; ConstrDescription
</span><a href="../../bytestring/src/Data.ByteString.Char8.html#pack"><span class="hs-identifier hs-var">BS8.pack</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; ConstrDescription) -&gt; String -&gt; ConstrDescription
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">OccName -&gt; String
</span><a href="GHC.Types.Name.Occurrence.html#occNameString"><span class="hs-identifier hs-var">occNameString</span></a></span><span> </span><span class="annot"><span class="annottext">(OccName -&gt; String) -&gt; OccName -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; OccName
forall a. NamedThing a =&gt; a -&gt; OccName
</span><a href="GHC.Types.Name.html#getOccName"><span class="hs-identifier hs-var">getOccName</span></a></span><span> </span><span class="annot"><span class="annottext">(TyCon -&gt; OccName) -&gt; TyCon -&gt; OccName
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; TyCon
</span><a href="GHC.Core.DataCon.html#dataConTyCon"><span class="hs-identifier hs-var">dataConTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681003808"><span class="hs-identifier hs-var">data_con</span></a></span><span>
</span><span id="line-913"></span><span>   </span><span id="local-6989586621681003795"><span class="annot"><span class="annottext">val_descr :: ConstrDescription
</span><a href="#local-6989586621681003795"><span class="hs-identifier hs-var hs-var">val_descr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; ConstrDescription
</span><a href="../../bytestring/src/Data.ByteString.Char8.html#pack"><span class="hs-identifier hs-var">BS8.pack</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; ConstrDescription) -&gt; String -&gt; ConstrDescription
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">OccName -&gt; String
</span><a href="GHC.Types.Name.Occurrence.html#occNameString"><span class="hs-identifier hs-var">occNameString</span></a></span><span> </span><span class="annot"><span class="annottext">(OccName -&gt; String) -&gt; OccName -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; OccName
forall a. NamedThing a =&gt; a -&gt; OccName
</span><a href="GHC.Types.Name.html#getOccName"><span class="hs-identifier hs-var">getOccName</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681003808"><span class="hs-identifier hs-var">data_con</span></a></span><span>
</span><span id="line-914"></span><span>
</span><span id="line-915"></span><span class="hs-comment">-- We need a black-hole closure info to pass to @allocDynClosure@ when we</span><span>
</span><span id="line-916"></span><span class="hs-comment">-- want to allocate the black hole on entry to a CAF.</span><span>
</span><span id="line-917"></span><span>
</span><span id="line-918"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#cafBlackHoleInfoTable"><span class="hs-identifier hs-type">cafBlackHoleInfoTable</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmInfoTable"><span class="hs-identifier hs-type">CmmInfoTable</span></a></span><span>
</span><span id="line-919"></span><span id="cafBlackHoleInfoTable"><span class="annot"><span class="annottext">cafBlackHoleInfoTable :: CmmInfoTable
</span><a href="GHC.StgToCmm.Closure.html#cafBlackHoleInfoTable"><span class="hs-identifier hs-var hs-var">cafBlackHoleInfoTable</span></a></span></span><span>
</span><span id="line-920"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmInfoTable :: CLabel
-&gt; SMRep
-&gt; ProfilingInfo
-&gt; Maybe CLabel
-&gt; Maybe (Id, CostCentreStack)
-&gt; CmmInfoTable
</span><a href="GHC.Cmm.html#CmmInfoTable"><span class="hs-identifier hs-type">CmmInfoTable</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cit_lbl :: CLabel
</span><a href="GHC.Cmm.html#cit_lbl"><span class="hs-identifier hs-var">cit_lbl</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="GHC.Cmm.CLabel.html#mkCAFBlackHoleInfoTableLabel"><span class="hs-identifier hs-var">mkCAFBlackHoleInfoTableLabel</span></a></span><span>
</span><span id="line-921"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cit_rep :: SMRep
</span><a href="GHC.Cmm.html#cit_rep"><span class="hs-identifier hs-var">cit_rep</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SMRep
</span><a href="GHC.Runtime.Heap.Layout.html#blackHoleRep"><span class="hs-identifier hs-var">blackHoleRep</span></a></span><span>
</span><span id="line-922"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cit_prof :: ProfilingInfo
</span><a href="GHC.Cmm.html#cit_prof"><span class="hs-identifier hs-var">cit_prof</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ProfilingInfo
</span><a href="GHC.Cmm.html#NoProfilingInfo"><span class="hs-identifier hs-var">NoProfilingInfo</span></a></span><span>
</span><span id="line-923"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cit_srt :: Maybe CLabel
</span><a href="GHC.Cmm.html#cit_srt"><span class="hs-identifier hs-var">cit_srt</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe CLabel
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-924"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cit_clo :: Maybe (Id, CostCentreStack)
</span><a href="GHC.Cmm.html#cit_clo"><span class="hs-identifier hs-var">cit_clo</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (Id, CostCentreStack)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-925"></span><span>
</span><span id="line-926"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#indStaticInfoTable"><span class="hs-identifier hs-type">indStaticInfoTable</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmInfoTable"><span class="hs-identifier hs-type">CmmInfoTable</span></a></span><span>
</span><span id="line-927"></span><span id="indStaticInfoTable"><span class="annot"><span class="annottext">indStaticInfoTable :: CmmInfoTable
</span><a href="GHC.StgToCmm.Closure.html#indStaticInfoTable"><span class="hs-identifier hs-var hs-var">indStaticInfoTable</span></a></span></span><span>
</span><span id="line-928"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmInfoTable :: CLabel
-&gt; SMRep
-&gt; ProfilingInfo
-&gt; Maybe CLabel
-&gt; Maybe (Id, CostCentreStack)
-&gt; CmmInfoTable
</span><a href="GHC.Cmm.html#CmmInfoTable"><span class="hs-identifier hs-type">CmmInfoTable</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cit_lbl :: CLabel
</span><a href="GHC.Cmm.html#cit_lbl"><span class="hs-identifier hs-var">cit_lbl</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="GHC.Cmm.CLabel.html#mkIndStaticInfoLabel"><span class="hs-identifier hs-var">mkIndStaticInfoLabel</span></a></span><span>
</span><span id="line-929"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cit_rep :: SMRep
</span><a href="GHC.Cmm.html#cit_rep"><span class="hs-identifier hs-var">cit_rep</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SMRep
</span><a href="GHC.Runtime.Heap.Layout.html#indStaticRep"><span class="hs-identifier hs-var">indStaticRep</span></a></span><span>
</span><span id="line-930"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cit_prof :: ProfilingInfo
</span><a href="GHC.Cmm.html#cit_prof"><span class="hs-identifier hs-var">cit_prof</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ProfilingInfo
</span><a href="GHC.Cmm.html#NoProfilingInfo"><span class="hs-identifier hs-var">NoProfilingInfo</span></a></span><span>
</span><span id="line-931"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cit_srt :: Maybe CLabel
</span><a href="GHC.Cmm.html#cit_srt"><span class="hs-identifier hs-var">cit_srt</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe CLabel
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-932"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cit_clo :: Maybe (Id, CostCentreStack)
</span><a href="GHC.Cmm.html#cit_clo"><span class="hs-identifier hs-var">cit_clo</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (Id, CostCentreStack)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-933"></span><span>
</span><span id="line-934"></span><span class="annot"><a href="GHC.StgToCmm.Closure.html#staticClosureNeedsLink"><span class="hs-identifier hs-type">staticClosureNeedsLink</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmInfoTable"><span class="hs-identifier hs-type">CmmInfoTable</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-935"></span><span class="hs-comment">-- A static closure needs a link field to aid the GC when traversing</span><span>
</span><span id="line-936"></span><span class="hs-comment">-- the static closure graph.  But it only needs such a field if either</span><span>
</span><span id="line-937"></span><span class="hs-comment">--        a) it has an SRT</span><span>
</span><span id="line-938"></span><span class="hs-comment">--        b) it's a constructor with one or more pointer fields</span><span>
</span><span id="line-939"></span><span class="hs-comment">-- In case (b), the constructor's fields themselves play the role</span><span>
</span><span id="line-940"></span><span class="hs-comment">-- of the SRT.</span><span>
</span><span id="line-941"></span><span id="staticClosureNeedsLink"><span class="annot"><span class="annottext">staticClosureNeedsLink :: Bool -&gt; CmmInfoTable -&gt; Bool
</span><a href="GHC.StgToCmm.Closure.html#staticClosureNeedsLink"><span class="hs-identifier hs-var hs-var">staticClosureNeedsLink</span></a></span></span><span> </span><span id="local-6989586621681003784"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003784"><span class="hs-identifier hs-var">has_srt</span></a></span></span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmInfoTable"><span class="hs-identifier hs-type">CmmInfoTable</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cit_rep :: CmmInfoTable -&gt; SMRep
</span><a href="GHC.Cmm.html#cit_rep"><span class="hs-identifier hs-var">cit_rep</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681003783"><span class="annot"><span class="annottext">SMRep
</span><a href="#local-6989586621681003783"><span class="hs-identifier hs-var">smrep</span></a></span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-942"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">SMRep -&gt; Bool
</span><a href="GHC.Runtime.Heap.Layout.html#isConRep"><span class="hs-identifier hs-var">isConRep</span></a></span><span> </span><span class="annot"><span class="annottext">SMRep
</span><a href="#local-6989586621681003783"><span class="hs-identifier hs-var">smrep</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SMRep -&gt; Bool
</span><a href="GHC.Runtime.Heap.Layout.html#isStaticNoCafCon"><span class="hs-identifier hs-var">isStaticNoCafCon</span></a></span><span> </span><span class="annot"><span class="annottext">SMRep
</span><a href="#local-6989586621681003783"><span class="hs-identifier hs-var">smrep</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-943"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681003784"><span class="hs-identifier hs-var">has_srt</span></a></span><span>
</span><span id="line-944"></span></pre></body></html>